From: Peter Vandenabeele Date: 2012-01-11T00:16:37+09:00 Subject: Re: ruby image manipulation --0021cc0226c63b7deb04b62e0002 Content-Type: text/plain; charset=UTF-8 On Tue, Jan 10, 2012 at 2:55 PM, Daniel Stephens wrote: > Hey everyone, > > Just curious if anyone has had any luck installing ImageMagick-6.7.4-Q16 > and rmagick-2.13.x. I have been trying to follow a few posts out here, but > no luck. I can obviously get ImageMagick in stalled, but when I try to > install the gem rmagick(gem install rmagick) It's like it's trying to build > the gem. > *TL;DR* : $ sudo apt-get install libmagickcore-dev libmagickwand-dev ** Yes, it is trying to build "native extensions". Assuming you saw this error: ~/data/projects/temp/rmagick$ bundle install Fetching source index for http://rubygems.org/ Installing rmagick (2.13.1) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /home/peterv/.rvm/rubies/ruby-1.9.3-p0/bin/ruby extconf.rb checking for Ruby version >= 1.8.5... yes extconf.rb:128: Use RbConfig instead of obsolete and deprecated Config. checking for gcc... yes checking for Magick-config... no Can't install RMagick 2.13.1. Can't find Magick-config in /home/peterv/.rvm/gems/ruby-1.9.3-p0@rmagick /bin:/home/peterv/.rvm/gems/ruby-1.9.3-p0@global /bin:/home/peterv/.rvm/rubies/ruby-1.9.3-p0/bin:/home/peterv/.rvm/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/home/peterv/.rvm/rubies/ruby-1.9.3-p0/bin/ruby Gem files will remain installed in /home/peterv/.rvm/gems/ruby-1.9.3-p0@rmagick/gems/rmagick-2.13.1 for inspection. Results logged to /home/peterv/.rvm/gems/ruby-1.9.3-p0@rmagick /gems/rmagick-2.13.1/ext/RMagick/gem_make.out An error occured while installing rmagick (2.13.1), and Bundler cannot continue. Make sure that `gem install rmagick -v '2.13.1'` succeeds before bundling. I used the regular trick to find the required debian/Ubuntu packages: ~/data/projects/temp/rmagick$ apt-cache search magick | grep '\-dev' libmagick++-dev - object-oriented C++ interface to ImageMagick - development files libmagickcore-dev - low-level image manipulation library - development files libmagickwand-dev - image manipulation library - development files graphicsmagick-libmagick-dev-compat - image processing libraries providing ImageMagick interface libgraphicsmagick++1-dev - format-independent image processing - C++ development files libgraphicsmagick1-dev - format-independent image processing - C development files libvips-dev - image processing system good for very large images (dev) Installed ~/data/projects/temp/rmagick$ sudo apt-get install libmagickcore-dev # this pulls in 80+ packages .. probably a smaller set would suffice ... ~/data/projects/temp/rmagick$ sudo apt-get install libmagickwand-dev # this was only 1 package And now gem install or bundle install works: ~/data/projects/temp/rmagick$ bundle install Fetching source index for http://rubygems.org/ Installing rmagick (2.13.1) with native extensions Using bundler (1.0.21) HTH, Peter -- Peter Vandenabeele http://twitter.com/peter_v http://rails.vandenabeele.com --0021cc0226c63b7deb04b62e0002--