Compiling ImageMagick for MAMP Pro
Posted on November 20, 2012
Today I spent a good few hours trying to get ImageMagick to compile for MAMP on OSX. It seems like plenty of other people have also had to deal with this, so I thought I’d write up how I did it.
For the record, this was running MAMP Pro on OSX 10.7. You’re going to need xcode installed, and I used Macports to make life easier.
- In terminal, run sudo port install imagick.
- Edit ~/.profile and add the following line, where # is whatever version of PHP you’re running in MAMP. Mine was 5.3.14.
- Go to http://mamp.info/en/downloads/index.html and download MAMP Components (as of this writing, MAMP_components_2.0.2.zip)
- Unzip that file, find the latest version of PHP (it was 5.3.6 for me) and untar (tar -xf) that file. Move the untarred directory to /Applications/MAMP/bin/php/php#.#.##/include/php
- cd into that directory and run ./configure, then make, and finally make install
- Download imagick from http://pecl.php.net/get/imagick-2.3.0.tgz
- Untar that file, and then cd into the directory and run ./configure, then make, and make install
- Edit the appropriate php.ini, find where the rest of the extensions are, and add:
And that’s it! Well, mostly. Again, no guarantee that this will work for everyone – but hopefully it at least points you in the right direction.