Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to install gmagick php extension from source, using these commands:

    mkdir gmagick
    cd gmagick
    mkdir build
    mkdir local

    cd $HOME/gmagick/build
    wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.18.tar.gz
    tar zxvf GraphicsMagick-1.3.18.tar.gz
    cd GraphicsMagick-1.3.18
    ./configure --prefix=$HOME/gmagick/local --enable-shared --enable-symbol-prefix
    make
    make install
    export PATH=$HOME/gmagick/local/bin:$PATH

    cd $HOME/gmagick/build
    wget http://pecl.php.net/get/gmagick-1.1.2RC1.tgz
    tar zxvf gmagick-1.1.2RC1.tgz
    cd gmagick-1.1.2RC1
    phpize
    export PKG_CONFIG_PATH=$HOME/gmagick/local/lib/pkgconfig
    ./configure --prefix=$HOME/gmagick/local --with-gmagick=$HOME/gmagick/local
    make
    make install
    echo "extension=gmagick.so" > /etc/php5/conf.d/gmagick.ini

    service php5-fpm restart

The lines below contain the command that tests if is installed correctly and it's output.

    php -i | grep gmagick
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525+lfs/gmagick.so' - /usr/lib/php5/20100525+lfs/gmagick.so: undefined symbol: MagickBlurImage in Unknown on line 0
    /etc/php5/cli/conf.d/gmagick.ini,
    PWD => /root/gmagick/build/gmagick-1.1.2RC1
    OLDPWD => /root/gmagick/build
    _SERVER["PWD"] => /root/gmagick/build/gmagick-1.1.2RC1
    _SERVER["OLDPWD"] => /root/gmagick/build
share|improve this question

1 Answer 1

I ran into this same issue myself. The problem is the --enable-symbol-prefix flag when configuring GraphicsMagick. The Gmagick extension must not be able to find the symbols because the --enable-symbol-prefix "enables prefixing library symbols with 'Gm'" (from the documentation).

Here is a script I wrote to install GraphicsMagick from source - https://gist.github.com/bhdouglass/7851749.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.