Can't compile - library not found

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
mmonk

Can't compile - library not found

Post by mmonk »

Hi,

I need to install ImageMagick & PerlMagick on a linux webserver on which I do not have root. I can only write within my home directory and I cannot run anything from /sbin, including ldconfig.

When I compile and install imagemagick in my home directory using the --prefix and --with-perl-options=PREFIX= flags with configure, PerlMagick does not work. This seems to be because the Magick.so file cannot find the libMagick.so.10 file:

Code: Select all

$ ldd ./lib/perl5/site_perl/5.8.7/x86_64-linux/auto/Image/Magick/Magick.so
        libMagick.so.10 => not found
        libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00002b0084e29000)
        libz.so.1 => /usr/lib64/libz.so.1 (0x00002b0084fb4000)
        libtiff.so.3 => /usr/lib64/libtiff.so.3 (0x00002b00850c9000)
        libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x00002b008521c000)
        libbz2.so.1 => /usr/lib64/libbz2.so.1 (0x00002b008533d000)
        libpthread.so.0 => /lib64/tls/libpthread.so.0 (0x00002b008544d000)
        libm.so.6 => /lib64/tls/libm.so.6 (0x00002b0085562000)
        libc.so.6 => /lib64/tls/libc.so.6 (0x00002b00856e8000)
        /lib64/ld-linux-x86-64.so.2 (0x0000555555554000)
Now, if I set up an environmental variable in my shell, LD_LIBRARY_PATH, that points to the location of libMagick.so.10 in my home directory, then Magick.so will work. But this does not help me with what I really need it to do, because when I run PerlMagick from a web server, there is no way to set the environmental variable before Magick.so is loaded (that I know of), so it fails (often crashing the web server, incidently).

Now it seems to me that there should be a way to compile imagemagick so that Magick.so already knows, by itself, where to get libMagick.so.10. However, I have not been able to figure out how to do this. I have read the Advanced Unix Install documentation, and googled, and experimented, and asked elsewhere (including in the PerlMagick section here: viewtopic.php?f=7&t=8133&p=25860 ).

Can anybody here help me to do this? It seems like something that imagemagick should be able to do. I imagine there are many people who want to install it to run on a webserver on which they don't have root access.

Thanks so much for any help you can provide.
Post Reply