Skip to content

Instantly share code, notes, and snippets.

@joshuapaling
Last active December 14, 2015 06:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshuapaling/5046277 to your computer and use it in GitHub Desktop.
Save joshuapaling/5046277 to your computer and use it in GitHub Desktop.
# I battled for hours trying to install imagick via macports, trying to follow various tutorials.
# If you've been battling with macports, completely uninstall everything related to
# macports (http://guide.macports.org/chunked/installing.macports.uninstalling.html)
# and trying with Home Brew instead, using the instructions below
# install brew (http://mxcl.github.com/homebrew/)
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
# install imagemagick
brew install imagemagick
# tap dupes
brew tap homebrew/dupes
# tap homebrew php
brew tap josegonzalez/homebrew-php
# install imagick (Note: change this command to refer to your relevant PHP version. Eg, for PHP 5.4, execute "brew install php54-imagick")
brew install php53-imagick
# if giving errors on the installation, comment the content on ~/.bash_profile or ~/.profile, open a new terminal and retry
# edit php.ini file (in MAMP, choose "File" -> "Edit template" with the PHP version you are using)
# and add to the extensions (the route can be different)
extension="/usr/local/Cellar/php53-imagick/3.0.1/imagick.so"
# restart MAMP
# once ImageMagick is installed, head to:
/Applications/MAMP/Library/bin/envvars
# comment out the two lines
DYLD_LIBRARY_PATH="/Applications/MAMP/Library/lib:$DYLD_LIBRARY_PATH"
export DYLD_LIBRARY_PATH
# and add the line
export PATH="$PATH:/usr/local/bin"
# you may need ghostscript for conversions
brew install gs
# restart MAMP again
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment