Wednesday, May 26, 2010

RMagick (finally) installed on Kubuntu...

Start with the very well-done RMagick installation FAQ at: http://rmagick.rubyforge.org/install-faq.html

./configure runs OK, then make throws this error:
     "error: ‘png_info’ has no member named ‘trans’"

After much searching and trying, ran into several other errors, and finally realized I had to install the ImageMagick development support package

And there's a huge dependency list:

Went to KPackageKit to get the development version which installed correctly...

But it still failed in RMagick installation because it (RMagick) needed a later version (I had 6.5.4 and Rmagick 12.13.1 wanted 6.5.9)

Went to the ImageMagick home page and downloaded and installed their latest version (6.6.1-7) and that installed correctly...

But now when trying to run the ImageMagick convert program (as a quick test), I got another error message:
     "error while loading shared libraries: libMagickCore.so.3: cannot open shared object file: No such file or directory"

Here's the key to getting ImageMagick to finally run... which I finally stumbled upon at http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=15702 after getting that error message. Put the following two lines in your .brashrc (or equivalent) and now it works... Obviously something to do with default paths and where ImageMagic was installed.

     export LDFLAGS="-L/usr/local/lib -Wl,-rpath,/usr/local/lib"
     export LD_LIBRARY_PATH="/usr/local/lib"

Hopefully, some of these pointers will help someone.

Unbelievable...