Error in installation of rmagick [in rails 2.3.5]

2.1k views Asked by At

I was trying to install rmagick gem in rails 2.3.5 . but I could not install as it shows error. Same error comes in both rvm and system.

Building native extensions. This could take a while... ERROR: Error installing rmagick: ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb extconf.rb:153: undefined (?...) sequence: /^Version: ImageMagick\s+(?\d+.\d+.\d+-\d+)\s+(?\S+)\s+(?\S+)\s+(?\S+)/

Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/rmagick-2.13.4 for inspection. Results logged to /usr/lib/ruby/gems/1.8/gems/rmagick-2.13.4/ext/RMagick/gem_make.out

this was the error.

Already Installed imagemagick,libmagickwand-dev, libxml2-dev, libxslt-dev,libgraphics-magick-perl, libgraphicsmagick++1-dev, libgraphicsmagick++3, libgraphicsmagick1-dev, libgraphicsmagick3 (tried everything got from google)

2

There are 2 answers

0
Joe Fish On BEST ANSWER

If you don't need the very latest version, you could try:

gem install rmagick -v 2.13.3

And see if the previous one works for you.

0
joost On

Seems like v2.13.4 needs some extra stuff installed, simply not only install libs but also:

sudo apt-get install imagemagick

This fixed it for me.

FYI, I got the following error:

checking for ImageMagick version >= 6.4.9... *** 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.