OpenIndiana – installing ImageMagick and Rmagick gem
26 April, 2012
Posted by on
I found that the Rmagic gem wouldn’t install with the standard OpenIndiana package for ImageMagick because it was too old, and the one installed from the SFE repository didn’t seem to work. But installing ImageMagick from source (version 6.7.6) was pretty straight forward.
Only catch here was that because I installed it in /opt/local, the Magick-config tool couldn’t find its package config (.pc) files. i.e., I was getting this:
$ /opt/local/bin/Magick-config --cflags
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
The Rmagick extension needs to find `Magick-config` in PATH, and that needs to find it’s package config files. So:
$ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/local/lib/pkgconfig
$ export PATH=$PATH:/opt/local/bin
$ gem install rmagick -v '2.13.1'
Building native extensions. This could take a while...
Successfully installed rmagick-2.13.1
1 gem installed
Installing ri documentation for rmagick-2.13.1...
Installing RDoc documentation for rmagick-2.13.1...