1

I am attempting to install GraphicsMagick in a hosting account...

I used this info to get it to work in most cases:

How do you specify the location of libraries to a binary? (linux)

However, it still cannot find the delegates.mgk (which is in ./lib/GraphicsMagick-1.3.14/delegates.mgk) as witnessed in this error:

gm-bin convert: Unable to access configuration file (delegates.mgk) [No such file or directory].

Either, a) how do find out where the binary thinks this file should be, or b) how do I extend the wrapper script to help it out?

Sy Moen
  • 11

1 Answers1

3

Figured it out after looking through the binary for /PATH/

The binaries require these additional path variables:

$MAGICK_CONFIG_PATH
$MAGICK_CODER_MODULE_PATH
$MAGICK_FILTER_MODULE_PATH

...here is the resulting script modification form my setup:

#!/bin/sh
if [ -n "$LD_LIBRARY_PATH" ]; then
  LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/USER/lib
else
  LD_LIBRARY_PATH=/home/USER/lib
fi
[ -z "${MAGICK_CONFIGURE_PATH}" ] && export MAGICK_CONFIGURE_PATH=/home/USER/lib/GraphicsMagick-1.3.14/config
[ -z "${MAGICK_CODER_MODULE_PATH}" ] && export MAGICK_CODER_MODULE_PATH=/home/USER/lib/GraphicsMagick-1.3.14/modules-Q8/coders
[ -z "${MAGICK_FILTER_MODULE_PATH}" ] && export MAGICK_FILTER_MODULE_PATH=/home/USER/lib/GraphicsMagick-1.3.14/modules-Q8/filters
export LD_LIBRARY_PATH
exec /home/USER/bin/gm-bin "$@"
Rich Homolka
  • 32,350
Sy Moen
  • 31