I sincerely hope someone here can help me before I lose all my hair.

I'm developing a php web app requiring imagick extension and want to test it locally. I have os x 10.8.2 (Mountain Lion) and MAMP 2.1.1 installed.

I have installed imagemagick first with MacPorts but later having no success installing imagick removing MacPorts totally and installing imagemagick through homebrew.

Following directions from various websites I have made progress to the point where I'm now, having compiled imagick 3.1.0RC2 and installed to lib directory of MAMP, but when apache starts trying to load imagick.so results in the following error:

PHP Warning:  PHP Startup: Unable to load dynamic library
- dlopen(/Applications/MAMP/bin/php/php5.4.4/lib/php/extensions/no-debug-non-zts-20100525/imagick.so, 9): 
 Library not loaded: /usr/local/lib/libfreetype.6.dylib
   Referenced from: /usr/local/lib/libMagickWand-Q16.7.dylib
   Reason: Incompatible library version: libMagickWand-Q16.7.dylib 
   requires version 16.0.0 or later, but libfreetype.6.dylib provides version 15.0.0 in Unknown on line 0

Using otool -L /usr/local/lib/libfreetype.6.dylib shows

/usr/local/lib/libfreetype.6.dylib (compatibility version 16.0.0, current version 16.0.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
/usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.5)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)

but still this error complaining about incompatible version of libfreetype.

I've been working on this for 10 hours now trying everything from installing with pecl to compiling different packages from source and am quickly running out of patience.

Please anyone have ideas...

Kv. Eggert

  • Did you end up finding an answer to this? Having the same problem. – Tom McQuarrie Jun 23 '14 at 3:56

Are you sure the MacPorts install of imagemagick was removed along with MacPorts itself? I have a working imagemagick install, via Homebrew, and I have a different version of libMagickWand.

It's possible the brew link stage failed because there was an existing install. Try brew doctor and brew audit to find any issues with the overall setup, and then brew unlink imagemagick and brew link imagemagick and check the output looks good.

N.B. Your error message seems nonsensical regardless, but in lieu of any sensible answer I can see, this might just be the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.