Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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/' - /usr/lib/ cannot allocate memory in static TLS block in Unknown on line 0

I am running:


Any ideas what might be causing this? Thanks.

share|improve this question

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

jbouse@solitare:~$ cat /etc/*-release

Then I installed: aptitude install imagemagick

jbouse@solitare:~$ convert --version
Version: ImageMagick 6.4.5 2009-06-04 Q16 OpenMP
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.

share|improve this answer
I'm not trying to avoid apt-get and that is how I installed both ImageMagick and Imagick until now, but I'm having problems with the 'quantizeImage' function and I need to upgrade (not sure which of them is causing the problems, but my guess is that it's ImageMagick) – andi Aug 25 '09 at 10:55

Turns out this was caused by a bug in gcc 4.2.
More information: mailing list discussion and bug report

After recompiling ImageMagick with the --disable-openmp flag, imagick now loads fine.

share|improve this answer

Your Answer


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.