Howto install RMagick on CentOS 4

RMagick is an interface between the Ruby programming language and the ImageMagick® and GraphicsMagick image processing libraries.

To install RMagick on CentOS 4 you’ll need to install RMagick version 1 because version 2 requires newer version of ImageMagick that’s not available in CentOS 4 repositories.

I do assume that you already have installed RubyGems. If not, then read my post Install RubyGems on CentOS 4.

Let’s start by installing required libraries:

[root@lion ~]# yum  install gcc gcc-c++ ImageMagick-devel ghostscript freetype-devel \ 
                         libjpeg-devel libpng-devel libpng10-devel libwmf-devel libexif-devel libtiff-devel
[...]

Then install RMagick gem specifying version with ‘-v’ switch:

[root@lion ~]# gem install rmagick -v 1.15.14 
Building native extensions.  This could take a while...
Successfully installed rmagick-1.15.14
1 gem installed

2 comments ↓

#1 mark cai on 12.24.08 at 1:45 pm

very good article for me .
solved my problem.

#2 Howto install RMagick 2 on CentOS/RHEL 5 | Penguin on Rails on 10.24.09 at 8:21 pm

[...] tried to avoid ImageMagick upgrade and to install RMagick 1, but RMagick 1 failed to install with a strange compile error, probably because the gcc compliler [...]

Leave a Comment