Installing ImageMagick and Imagick on Mac OS X

Trying to get ImageMagick and it’s PHP extension working on OS X Lion is a frustrating process. It will often fail and even if you try to configure it manually you may get an error like the following.

checking ImageMagick MagickWand API configuration program...
configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.

First of all, install ImageMagick via MacPorts.

sudo port install ImageMagick

Now install the imagick PECL module.

sudo pecl install imagick

Very importantly however, make sure you specify the path when prompted, to be /opt/local, do not let it auto detect! Once this is done it should compile successfully and you will be prompted to add to your php.ini file.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.