Linux – imagick php extension fails to load

linuxPHPUbuntuweb-server

I can't seem to get Imagick to work.

I have PHP Version 5.2.8 installed (php-fpm used toghether with nginx).

I have installed the latest ImageMagick from source.

$ convert -version
Version: ImageMagick 6.5.5-1 2009-08-25 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC

I have installed imagick with the pecl installer:

$ pecl list
Package Version State
imagick 2.3.0   stable

When I try to restart the php server, I get:

Starting php_fpm PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613/imagick.so' - /usr/lib/libgomp.so.1: cannot allocate memory in static TLS block in Unknown on line 0

I am running:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION="Ubuntu 8.04.2"

Any ideas what might be causing this? Thanks.

Best Answer

Any particular reason you wanted to make it difficult on yourself and purposely avoid the Ubuntu packaging system?

jbouse@solitare:~$ cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.04
DISTRIB_CODENAME=jaunty
DISTRIB_DESCRIPTION="Ubuntu 9.04"

Then I installed: aptitude install imagemagick

jbouse@solitare:~$ convert --version
Version: ImageMagick 6.4.5 2009-06-04 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC

Then for good measure: aptitude install php5-imagick

I now have a PHP page that watermarks my images on the fly for me and another one that allows me to upload and watermark them. I've written a Python script to submit all images in a directory to the form and save the watermarked versions in another directory.

Related Topic