rmagick: Can't install gem on Ubuntu 15.04

Looks like there are new versions of ImageMagick & deps in Ubuntu 15.04 and I’m unable to meet the dependencies to build the gem with bundle. Last thing to try is install graphicsmagick-libmagick-dev-compat package, but still can’t make it work:

 gem install rmagick -v '2.13.2'

throws this error:

checking for wand/MagickWand.h... no
Can't install RMagick 2.13.2. Can't find MagickWand.h

Same problem reported in this stackOverflow question

About this issue

Most upvoted comments

I have the same issue. After installing libmagickwand-dev, which used to work for previous Ubuntu versions, I still cannot install rmagic.

rmagic’s configuration relies on Magick-config, which used to be part of imagemagick, but is now part of graphicsmagick - which is a fork of ImageMagick, specifically the graphicsmagick-libmagick-dev-compat package which is supposed to provide some backward compatibility with ImageMagick APIs and even provides MagicWand which is the API rmagic relies on. Unfortunately GraphicsMagick’s Magick-config does not provide correct include paths using the --cflags switch (though it does provide them for --cppflags) - this may be a bug in Ubuntu’s GraphicsMagick package, but I’m not going to go into that because I want to use ImageMagick.

ImageMagick can still be installed in Ubuntu 15.04, and does still provide its Magick-config utility, though now it is not on the path so rmagic doesn’t know how to call it.

The workaround is to preload the path before you call gem install, like this:

PATH="/usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16:$PATH" gem install rmagick

and that solved it for me.

I’m not sure how to go on from here - one way would be to get Ubuntu to fix GraphicsMagic’s Magick-config and maybe get rmagic to work with that library. Another may be to allow rmagic to find ImageMagick’s configuration utility somehow.

here’s what i did on 15.10, sudo apt-get install libmagickwand-dev sudo apt-get install graphicsmagick-imagemagick-compat PATH="/usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16:$PATH" gem install rmagick -v '2.13.2'

Thanks for your solution and I suppose to fix it permanently we could just do: ln -s /usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16/Magick-config /usr/bin/Magick-config

@simmogs , did you run gem with the PATH preloaded, as in my example, and did you make sure to first install libmagickwand-dev?