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
- Original URL
- State: open
- Created 9 years ago
- Comments: 20
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 ofimagemagick, but is now part ofgraphicsmagick- which is a fork of ImageMagick, specifically thegraphicsmagick-libmagick-dev-compatpackage which is supposed to provide some backward compatibility with ImageMagick APIs and even provides MagicWand which is the API rmagic relies on. Unfortunately GraphicsMagick’sMagick-configdoes not provide correct include paths using the--cflagsswitch (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-configutility, 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: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-configand 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-devsudo apt-get install graphicsmagick-imagemagick-compatPATH="/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
PATHpreloaded, as in my example, and did you make sure to first installlibmagickwand-dev?