Last Updated: February 25, 2016
·
1.362K
· chronon

MacPorts ImageMagick & PHP 5.4 imagick extension

The stable imagick package in pecl won't currently build with PHP 5.4.x. The latest beta will, so to install:

sudo pecl install imagick-beta

Having installed ImageMagick with MacPorts, when prompted for the prefix of my ImageMagick installation, the answer is:

/opt/local/

However, the build fails because apparently MacPorts names the ImageMagick header file directory ImageMagick-6 instead of ImageMagick. The fix is to make a symlink:

cd /opt/local/include
sudo ln -s ImageMagick-6/ ImageMagick

Now the imagick extension will build. Hooray!