Last Updated: February 25, 2016
·
1.578K
· 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!

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

PHP applications still send a browser full of JavaScript. Hardening the server does not inventory the payment, analytics, and plugin scripts that run after the HTML is delivered.

Security insights from Cside