Problem installing rmagick (using ruby 1.9.1)

Hi dudes

I’m coding my web application and I need to use the simple_captcha gem, which uses rmagick to generate captchas. I’m trying to install it, I already have imagemagick installed in my debian sid, and I found the following problem


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

/usr/bin/ruby1.9.1 extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for cc... yes
checking for Magick-config... no
Can't install RMagick 2.12.2. Can't find Magick-config in /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin

Googling a little I found this page which explains what to do, which is ‘apt-get install libmagickcore-dev‘ as root or using sudo.

After this, a new error appears


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

/usr/bin/ruby1.9.1 extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for cc... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.3.5... yes
checking for HDRI disabled version of ImageMagick... yes
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... no

Can't install RMagick 2.12.2. Can't find MagickWand.h.

And a new action is taken ‘apt-get install libmagickwand-dev‘.

Problems solved and gem installed.

M.

 

3 Comments

  1. thx, you saved my life

  2. Hei,
    this is really what I was searching for…
    I had the same problems but with debian lenny you must install a different package:

    sudo aptitude install libmagick9-dev

    This command install all libraries needed by RMagick gem.

  3. Very nice Blog, I will tell my friends about it.

    Thanks

Leave a comment