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.

11 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
    3. When running ./configure add the following config option: PKG_CONFIG_PATH=/path/to/imagemagick-install-directory/lib/pkgconfig/ :)

      Delete
  2. thx. ur solution worked for me.

    ReplyDelete
  3. Thanks for posting it dude, you made my day :D

    ReplyDelete
  4. Can you please give step by step information to install imagick in wamp server ?

    Thanks

    ReplyDelete
  5. I have been checking out a few of your stories and i can state pretty good stuff. I will definitely bookmark your blog undefined

    ReplyDelete
  6. Công ty tư vấn du học Đức uy tín hàng đầu Việt Nam. Hỗ trợ tận tình. Truy cập: vuatiengduc

    ReplyDelete