ImageMagick and MAMP

1,245 views
Skip to first unread message

bailey

unread,
Oct 6, 2012, 11:33:42 PM10/6/12
to omek...@googlegroups.com
Hi all,

I'm trying to get ImageMagick set up with MAMP. I've hunted around for solution, but I'm not finding anything that works. I've installed ImageMagick to Applications/MAMP/bin/ImageMagick and I set the path in Settings to /opt/local/bin/. When I run the test it fails. However, when I can successfully convert images from the terminal. I know others have run into this problem, but I'm holding out hope that someone has come up with a solution.

Cheers,
Bailey

Wayne Graham

unread,
Oct 7, 2012, 7:31:11 AM10/7/12
to omek...@googlegroups.com
Hi Bailey,

ImageMagick is kind of a pain. If you don't already have homebrew
installed, I would use that (http://mxcl.github.com/homebrew/).

You'll need to edit the php.ini file for mamp and make sure it points
to the correct location for the imgack shared object. It'll look
something like this:

extension="/usr/local/Cellar/php53-imagick/3.0.1/imagick.so"

Then, in the MAMP envvars (/Application/MAMP/Library/bin/envvars),
comment out the two lines that read

DYLD_LIBRARY_PATH="/Applications/MAMP/Library/lib:$DYLD_LIBRARY_PATH"
export DYLD_LIBRARY_PATH

and add

export PATH="$PATH:/usr/local/bin"

If that doesn't work when you restart MAMP, do these commands:

brew tap homebrew/dupes
brew tab josegonzalex/homebrew-php
brew install php53-imagick

HTH,
Wayne

/**
* @author Wayne Graham
* @link http://www.liquidfoot.com
*/
> --
> You received this message because you are subscribed to the Google Groups
> "Omeka Dev" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/omeka-dev/-/xo7_igYbjRsJ.
> To post to this group, send email to omek...@googlegroups.com.
> To unsubscribe from this group, send email to
> omeka-dev+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/omeka-dev?hl=en.

bailey

unread,
Oct 8, 2012, 4:14:35 PM10/8/12
to omek...@googlegroups.com
Hi Wayne,

Thanks for the response. So, I have Homebrew installed and it verifies that ImageMagick 6.7.5 is installed. However, I'm not seeing an imagick.so in the following path /usr/local/Cellar/imagemagick. (However, there are lots of other .so files in /usr/local/Cellar/imagemagick/6.7.5-7/lib/ImageMagick/modules-Q16/coders.) Any ideas?

Wayne Graham

unread,
Oct 8, 2012, 4:37:57 PM10/8/12
to omek...@googlegroups.com
Hi Bailey,

I just looked at mine and it's in
/usr/local/Cellar/imagick/3.0.1/lib/php/extensions/imagick.so.
However, I forgot you don't need this bit; just the ability to shell
to the convert utility. Shouldn't need this (for now)...is it working
as expected? You can also take a look at the MAMP components from
http://www.mamp.info/en/downloads/index.html...

Wayne

/**
* @author Wayne Graham
* @link http://www.liquidfoot.com
*/


> https://groups.google.com/d/msg/omeka-dev/-/jprCC45Yf7AJ.

Wayne Graham

unread,
Oct 8, 2012, 4:52:46 PM10/8/12
to omek...@googlegroups.com
Oh yeah, and FWIW, if you get frustrated with this, you can also use
Vagrant in the workflow (see https://github.com/scholarslab/cookbooks)
and just use a virtual server. Convert works like a champ in the
lucid32 box, and you can use the recipes in production...

Wayne

/**
* @author Wayne Graham
* @link http://www.liquidfoot.com
*/


bailey

unread,
Oct 26, 2012, 6:04:40 PM10/26/12
to omek...@googlegroups.com
Thanks Wayne! I finally got around to this today, and it worked! Just to recap, here are my steps to success:

  • Use homebrew to install imagemagick
  • In the MAMP envvars (/Application/MAMP/Library/bin/envvars) comment: 

  • DYLD_LIBRARY_PATH="/Applications/MAMP/Library/lib:$DYLD_LIBRARY_PATH" 
    export DYLD_LIBRARY_PATH 
  • Update imagemagick path in Omeka settings to /usr/local/bin
Bailey

niek

unread,
Mar 6, 2014, 1:41:42 AM3/6/14
to omek...@googlegroups.com
Hi all,

Just wanted to share the news that MAMP Pro 3 just came out, and it has ImageMagick installed by default, which will make our Omeka-theming-lives a bit easier!
Niek

Arden

unread,
Jan 6, 2015, 10:14:25 AM1/6/15
to omek...@googlegroups.com
I've been spending a lot of time staring at this thread today, so I thought I'd post what finally worked for me, in case anyone else runs into the problems I did. I had great hopes for MAMP Pro 3, and tried out the free trial, but ImageMagick didn't work - perhaps it's not part of the free trial and you have to pony up before the module is active, but while waiting for an answer on that, I got it working with regular old MAMP. Here's what finally worked, using more of Wayne's advice (thanks, Wayne!!!) than Bailey had to:
  • set up MAMP to run on PHP 5.3.29 (which my live shared host is running) - it seems very important that everything is compatible with the right version of PHP
    • in MAMP 3.0.7.3 by default you can only choose from the latest 2 versions of PHP, but there are really 6 different versions available
    • following http://forum.mamp.info/viewtopic.php?f=2&t=77594:
      • rename MAMP/bin/php/php5.5.18_X
      • rename MAMP/bin/php/php5.6.2_X
    • now php5.3.29 is available in MAMP
  • install homebrew, using Terminal
  • in Terminal, use homebrew to install php53-imagick
    • brew tap homebrew/dupes 
    • brew tap josegonzalez/homebrew-php 
    • brew install php53-imagick 
  • in /Applications/MAMP/bin/php/php5.3.29/conf/php.ini
    • change ;extension=imagick.so to
    • extension="/usr/local/Cellar/php53-imagick/3.1.0RC2/imagick.so"
  • in the MAMP envvars (/Application/MAMP/Library/bin/envvars), change to comment out last 6 lines and add 1:
#if test "x$DYLD_LIBRARY_PATH" != "x" ; then
#  DYLD_LIBRARY_PATH="/Applications/MAMP/Library/lib:$DYLD_LIBRARY_PATH"
#else
#  DYLD_LIBRARY_PATH="/Applications/MAMP/Library/lib"
#fi
#export DYLD_LIBRARY_PATH
#
export PATH="$PATH:/usr/local/bin"
  • Update imagemagick path in Omeka settings to /usr/local/bin
I'd love to think there's a simpler way, but I tried MANY different ways following MANY different people's posts, and this is what finally worked. 

Good luck to all others who try!
Reply all
Reply to author
Forward
0 new messages