Search code examples
ruby-on-railsimagemagickrmagick

Installing ImagMagick and rmagick gem in CentOS


I know this has been asked several times, but the problem is they bring in new versions of rmagick and the older methods are not applicable now.

Server - CentOS release 5.6 (Final)
Ruby - ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-linux]
Rails - 2.3.5

I tried to install rmagick gem through these steps. I was root user when I executed these queries:

yum install ImageMagick.i386
yum install ImageMagick-c++-devel.i386
gem install rmagick

The first 2 commands executed smoothly without any errors. On gem install rmagick, I am getting this error:

ERROR:  Error installing rmagick:
    ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... yes

Warning: Found a partial ImageMagick installation. Your operating system likely has some built-in ImageMagick libraries but not all of ImageMagick. This will most likely cause problems at both compile and runtime.
Found partial installation at: /usr
checking for ImageMagick version >= 6.4.9... no
Can't install RMagick 2.13.1. You must have ImageMagick 6.4.9 or later.

My question is how can I install a version > 6.4.9 of ImageMagick. Isnt yum install supposed to install latest version of ImageMagick? or should I try an older version of rmagickgem? In that case, does any one know the older version numbers of rmagick gem?


Solution

  • The version of ImageMagick in the CentOS yum repo is outdated. This kind person has provided updated packages: Problem installing RMagick rubygem on Centos 5