Ghostscript ImageMagick RHEL errors

29 Mar 2012

A little problem I came across today. When you install ImageMagick (IM) on RHEL (or OEL or similar), IM fails when converting pdfs.

You can see the problem ( by logging the output of IM. For example, here’s an attempted conversion of test.pdf to test.tif:

% convert -debug all -log "%u %m:%l %e" test.pdf test.tif 2>&1 | less

This gives errors like this:

0.000u module.c:1278 unable to load module `/usr/lib/ImageMagick-6.7.5<wbr>/modules-Q16/coders/<a href="" target="_blank"></a>': cannot open shared object file: No such file or directory</wbr>

So, I downloaded and unpacked a RHEL ghostscript rpm - it turns out that the rpms have symlinks to in the package, but no :-(

/var/tmp/usr/lib # ls -al*
lrwxrwxrwx 1 root root    13 Mar 28 20:41 ->
lrwxrwxrwx 1 root root    13 Mar 28 20:41 ->

Easy you think, just install something like libgs.123.rpm, and everything will work. But there isn’t such an rpm…

So, download the ghostscript source, build it as a shared library (using the not quite obvious make so), copy the lib to /usr/lib, fix up the symlinks. Then all is  happiness and light:

% cd /var/tmp
% wget
% tar zxvf ghostscript-8.71.tar.xz
% cd ghostscript-8.71
% ./configure
% make so
% rm -i /usr/lib/*
% cp sobin/ /usr/lib
% ln -s
% ln -s

Oh the pain - why can’t the world just use The Universal Operation System - Debian?!

comments powered by Disqus

  « Previous: Next: »