简体   繁体   中英

Installing ruby RMagick gem on Ubuntu server without installing X

I would like to use the RMagick gem on an Ubuntu 10.04 server. This is easy to do system-wide using the Ubuntu package librmagick-ruby1.8 , but I would like to install the gem in a private location using gem install (or Bundler). Unfortunately, this results in the error

Failed to build gem native extension.

unless the package libmagickcore-dev is installed. A Google or Stackoverflow search for "rmagick ubuntu" leads to lots of people suggesting installing various packages that result in this one getting installed. The problem with this solution is that installing that package also brings in the entire X Windows System as a dependency, which is obviously not desirable on a server.

This should be a common problem. So I am wondering whether anyone has found a solution that does not require X. Thanks for your help!

The only solution I have so far is to install Imagemagick from source into /usr/local . After doing this, the RMagick gem installs correctly. This is unfortunate, however, since Imagemagick is somewhat difficult to compile, and also then ends up outside of the Ubuntu package management system and is hard to keep up-to-date.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM