Tuesday, December 6, 2011

imagick.so undefined symbol error on PHP 5.3

Background info: Runnind CentOs 5.5 (and 5.7 on another machine) with PHP 5.3.8.

After doing a "pecl install imagick" I was getting the following error, and imagick wasn’t showing up on phpinfo():

php: symbol lookup error: /usr/local/lib/php/extensions/no-debug-non-zts-20090626/imagick.so: undefined symbol: MagickWandGenesis

This thing was bugging me for weeks! But I finally got it working. The brunt of it is that you should use imagick-2.3.0 instead of the 3.x.x version. Here is what I did:

# yum install ImageM* netpbm gd gd-* libjpeg libexif gcc coreutils make
# cd /usr/local/src
# wget http://pecl.php.net/get/imagick-2.3.0.tgz
# tar zxvf ./imagick-2.3.0.tgz
# cd imagick-2.3.0
# phpize
# ./configure
# make
# make test
# make install

Once that’s done just restart apache and you’re good to go!

# service httpd restart

I wonder if anyone else had this issue.

4 comments:

  1. I did, I discovered that my PKG_CONFIG_PATH was not set properly. Fixed it and it worked.

    ReplyDelete
    Replies
    1. So now it works with imagick 3.x.x? Cool, I'll have to try that!

      Delete
    2. Do you have any news regarding this issue?

      Thanks!

      Delete
  2. thx. ur solution worked for me.

    ReplyDelete