How to install rmagick on Ubuntu 10.04?

I think you also have to install libmagickwand-dev from the ubuntu archive:

sudo apt-get install libmagickwand-dev

This package contains the MagickWand.h file.


sudo apt-get install libmagickwand-dev imagemagick

I did as following step to build from source

> wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
> tar -xzvf ImageMagick.tar.gz
> ./configure --prefix=/usr/local --with-x=no --disable-static --with-modules --without-perl --without-magick-plus-plus --with-quantum-depth=8 --disable-openmp
> make
> sudo make install
> sudo /sbin/ldconfig /usr/local
> sudo ln -f /usr/local/bin/Magick-config /usr/bin/Magick-config
> sudo PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ gem install rmagick

Result

Building native extensions.  This could take a while...
Successfully installed rmagick-2.13.1
1 gem installed

I had a similar problem and came across this post: http://www.question-defense.com/2010/05/18/centos-linux-cant-install-rmagick-2-7-0-cant-find-magick-config

After I installed libmagick9-dev i could install rmagick gem without problem. Hope this helps.