• Home
  • Photos
  • Software
  • Resumé
  • Contact

Saturday, February 16. 2008

Getting Imagemagick (and more) to work with MAMP on OS X

Posted by Bryan Rite in Computers, Tutorials
Comments (6) | Trackbacks (0)
I've been using MAMP on my macbook for doing my web development at home and can't say enough good things about it. Unfortunately I had to start using some binaries not included with MAMP, ImageMagick for example.

Installing ImageMagick via MacPorts is simple enough:

sudo port install ImageMagick

but trying to run it via the MAMP stack gives you the apache error:

dyld: Symbol not found: __cg_jpeg_resync_to_restart
  Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
  Expected in: /Applications/MAMP/Library/lib/libjpeg.62.dylib

or something similar. I was able to get it to go, but you need to break the sandbox, so it may not be a viable solution for everyone.

Once ImageMagick is installed, head to:

/Applications/MAMP/Library/bin/envvars

Here we want to 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:/opt/local/bin"

What we're doing is using our systems default DYLD Library path, not the sandboxed one, and exporting our MacPorts bin directory into the sandbox PATH, so it can execute your ImageMagick bins like convert without specifying the full path to it.

Presto! I'm not sure of the full consequences of doing this but I haven't run into any problems yet and nothing seems to break as a result. Always backup the original files tho!
 
Comments
Display comments as (Linear | Threaded)

Wow, thanks. I just spent a lot of time looking for a way to use ImageMagick with MAMP. Nothing seemed to work until this.

Of course, I don't understand this much, so if it takes everything else down, I'll be bummed, but c'est la guerre.
#1 Steve Lawson (Link) on 2008-02-20 22:37 (Reply)
Thank you! Thank you! Thank you! You're lucky you're not within reach or I'd give you a big sloppy kiss right now. I've been struggling with ImageMagick and MAMP for days, and I'm on a tight schedule. This post just totally saved my sanity...

I have to go update a whole slew of forum posts now... :-)
#2 chad on 2008-03-14 17:53 (Reply)
Hey I also use MAMP but not with ImageMagick but at least now I know how to use it :-) MAMP is awesome tho, I even prefer developing on my Mac now instead of on my PC with some other PHP/MySQL dev server.
#3 Carlo (Link) on 2008-03-15 11:51 (Reply)
I've also tried some things to get this going but nothing really worked until I read your hints. So thanks for that.
#4 Bernd (Link) on 2008-05-30 01:29 (Reply)
You rock Bryan! I even KNEW that the problem was that MAMP wasn't looking in the right place (via the Console) but I had no idea what to fix! I spent several hours pouring through all the http config files. If it weren't for you, I probably wouldn't sleep tonight! Ah, I can't wait for those extra Z's.
#5 Russell (Link) on 2008-06-12 19:52 (Reply)
Actually, in all seriousness, do you have a Paypal account? I got paid for the work I'm doing on this matter and you totally deserve a $10 tip for this note. Send me an email and let me know if I can send you some dosh!

Also of note, to anyone else out there: if you're like me and installed Imagemagick and MAMP in order to get tex to show equations, you'll also need to make sure that gs can run under httpd and for that you'll need to make sure that MAMP has usr/local/bin. So just add on to Bryan's path like so:

export PATH="$PATH:/opt/local/bin:/usr/local/bin"
#6 Russell (Link) on 2008-06-12 20:52 (Reply)

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

 
 
Recent Posts
Black Tusk Hike Photos
July 13 2008

Getting Imagemagick (and more) to work with MAMP on OS X
February 16 2008

Select DISTINCT from DataSet
January 30 2008

Mega Burgers Pt 3: Setting Short Term Goals
January 23 2008

Mega Burgers Pt 2: The Trifecta of Obesity
January 22 2008

Quicksearch
Interesting Links
  • Footstops - Travel Journals
  • Alkaloid Projects
  • The Docupedia
  • Stop Mining Tibet
  • VBS.tv
  • Project Enlightenment
  • The Middle Part
Blog Categories
  • XML Computers
  • XML Friends
  • XML Mini-series: Burgers
  • XML Music
  • XML Photography
  • XML Rant
  • XML Recipes
  • XML Travel
  • XML Tutorials
  • XML Videos


All categories
Blog Archives
August 2008
July 2008
June 2008
May 2008
April 2008
Recent...
Older...

Designed by Bryan Rite © 2008 | Login