
This is a bash script that attempts to download, extract and compile what’s required in order to successfully install ImageMagick on Snow Leopard.
Update: I moved the script on github.
Update 2: there are now much better systems to install utilities like this. Check out Homebrew for example.
$1.99 domains with SSL purchase!
Thanks for this wunderful shell script!
All runs now :)
Hi.
Thanks. This is the only reasonable install and compile description I could find that did not involve installing a parallel toolchain.
A couple of notes.
1) A couple of the sourceforge downloads fell over due to url or package name changes. No bother, just needed to check online and repair the urls.
2) If you want to use perl magick, and are getting the error: “Can’t locate Image/Magick.pm in @INC” then you need to alter the ImageMagick /.configure to read:
./configure –prefix=/usr/local –disable-static –with-modules –without-magick-plus-plus –with-quantum-depth=8 –with-gs-font-dir=/usr/local/share/ghostscript/fonts
(ie. remove the “–without-perl” from the command)
And it will install the Magick.pm in the right place once you have made and made install
Many thanks and good day to you.
Michael
@Michael
meh, we can’t even trust sourceforge mirrors anymore ;) I updated the script to use heanet, should be good to go.
thanks for pointing out the Perl installation, I admit that this script was primarly targeted to a Ruby/Ruby on Rails developer.
Theres an error on this line:
tar xzvf jpegsrc.v7.tar.gz
cd jpeg-6b
should be:
tar xzvf jpegsrc.v7.tar.gz
cd jpeg-7
@Dan McGrady
thanks for spotting this, post fixed.
Hi,
thanks, your script worked fine for me except that I get the following error in some ImageMagick commands:
Magick::ImageMagickError: Wrong JPEG library version: library is 70, caller expects 62 `’ @ jpeg.c/EmitMessage/232
Can anybody advice? What do I need to do?
Reported here: http://github.com/masterkain/ImageMagick-sl/issues/#issue/1 macports issue
Hi Claudio,
thanks for your effort! Just downloaded your script and ran it here on my 10.6.1 machine.
However, the script ends with:
So, I suppose, a working X11 installation is needed for running ImageMagick, even if I’ll never use the display command?
Cheers,
Stefan.
hi Stefan,
I never run into any problem without X11; however it seems that you are running ImageMagick-6.5.5 and in your Application directory, the script uses 6.5.6-10 and it installs in /usr/local by default.
So I don’t know what’s going on on your system, try cleaning other ImageMagick versions before attempting to run the script.
You may want also to try “which convert” to see where’s the current binary location.
ciao Claudio, your script works ok, but I am having a heck of a day trying to understand why IM always complains about Wrong JPEG library version. Actually I am not using macports, and I’ve run several times your script after removing “redundants” file and libs from /usr/local/lib. Compilation is OK, anyway when it runs the tests it always fails with the dreaded error message:
ImageMagick installed.
Version: ImageMagick 6.5.6-10 2009-11-11 Q8 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
Testing…
convert: Wrong JPEG library version: library is 70, caller expects 62 `logo.jpg’ @ jpeg.c/EmitMessage/232.
Tests done.
any support on this would be highly appreciated. Ciao! :)
hi yortz,
can you please run
and see if there’s some result? note that locate.updatedb may require some time to finish.
@myself: I am such an “ass”
actually i did it quire differently, since in a way or another I had another libjpeg messing with the convert task, i run “convert -list configure” and found the line that was messing with jpg convert
LDFLAGS -L/usr/local/lib -L/usr/local/lib -L/sw/lib -L/usr/X11/lib -R/usr/X11/lib
actually as you can see i got a previous fink install running on my macbookpro, reason why when trying to convert the jpg it was always complaining (loading the old 62 lib)
So to fix the issue:
1) be sure to remove your /sw folder (and opt/local if you are using macports)
2) /usr/local/lib (just to be sure i got rid of all previous install files and ilbs)
3) rerun your script as root from /usr/local/src (this is the folder that i use to build )
… and then magically imagemagick builds and all tests pass and i can go back to my rails app and correctly upload jpegs:)
grazie Claudio! good work with your script, so for anyone else dealing with this error just be sure to remove both macports and fink! wasted my whole afternoon after this!:)
hey yortz, glad you sorted that out and posted the solution here, thanks!
saved me a ton of trouble! THANK YOU !!
Thanks for putting this together. I am excited about getting imagemagick working on 10.6.2.
I am new to customizing os x server, although I am pretty comfortable with linux. Anyway, I hope you can offer a suggestion.
The installed failed, the first error reported was immediately after downloading and decompressing files:
Starting…
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… configure: error: unsafe absolute working directory name
make: *** No targets specified and no makefile found. Stop.
TIA,
– Mark
Please disregard my previous note. For anyone who comes along behind me, here is what solved my problem: I thought about yortz’s post on Nov. 11, then deleted macports and related files in usr/local. More importantly, I ran the script in /usr/local as root. That was a key issue in my case.
The script ran straight through, all tests worked and I was able to verify the version with the “identify” command.
Thanks for taking the time to put this script together!
Thanks for this script. Saved me from days of torment again. Worked first time for me on 10.6.2.
Dude, this is awesome! Thanks for taking the time. Worked first time for me too, 10.6.2.
Thanks kain, for sharing the script.
I just chaged it to install the new ImageMagick-6.5.9-1 … everything worked quite well on 10.6.2!
thx again!
Don’t you miss a /fonts in line 144? Had some trouble with the fonts but other than that it worked great! Thanks a lot!
Downloading http://heanet.dl.sourceforge.net/project/freetype/freetype2/2.3.11/freetype-2.3.11.tar.gz
ls: freetype-2.3.11.tar.gz: No such file or directory
Failed download: http://heanet.dl.sourceforge.net/project/freetype/freetype2/2.3.11/freetype-2.3.11.tar.gz, size: B, aborting.
I have no idea why it is doing this, the url works fine when i try it in a browser
Help?
please delete last comment: permissions issue
Thanks for making this script, it really saved me a lot of time.
I updated the lib-png download URL, which was broken. For some reason they removed 1.2.42, so I bumped it up to 1.2.43 which allowed the script to install ImageMagick on Snow Leopard just fine, and it’s working great with Rmagick 2.13.0.
lib-png 1.4 is available, but I dedicated to increment by only one minor version, to 1.2.43, in the interest of not rattling the cages of anything else that may depend on lib-png.
I just sent a pull request, but if anyone comes across this before it gets merged in, here’s a link to the commit that fixes it – http://github.com/kjohnston/ImageMagick-sl/commit/a7bc1823ef4678d2673bf3c95902bbf6dc62ad4d
hello,
thanks, I merged the commit.
cheers
thank you, this worked perfectly for me!
masterkain, my apologies for the multiple commits. i’m new to github but needed to update the files (i didn’t realize i needed to update it in two places)
absolutely no problem, thanks for contributing!
quick question: after completing the install, i get these lines:
—–
ImageMagick installed.
/usr/local/bin/install_im.sh: line 150: convert: command not found
Testing…
Tests done.
—–
Has anyone faced this issue?
by mistake in a pull request from another developer a CONFIGURE_PREFIX=/usr/local/ImageMagick slipped in instead of /usr/local, it is just been fixed in the repo
kain, i’m not sure if you got all 3 of my changes to the file. i changed the download link for libpng and ImageMagick but I forgot to change the folder names below that so I had a 3rd commit that changed those folder names as well. Should I commit the changes again?
The path to ImageMagick-6.6.3-0 is no longer valid, so I needed to make a couple changes to get this script working.
I needed to update line 67 to:
try_download ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.6.3-3.tar.gz
And line 141 to:
cd ImageMagick-6.6.3-3
Thanks for this helpful script!
Libpng link is broken as well.
Replace line 66 with:
try_download http://download.sourceforge.net/libpng/libpng-1.4.3.tar.gz
thank you. watching all those commands race by and knowing it would have been slow going had i tried to do it without your script makes me very grateful. what a great community.
thank you sooo much. the script ran fine and all is good. Great community – I second that. Have a lovely day.
(if anyone knows how I can install links2 with –enable-graphics in the configure options – you are my hero. All libraries are in place but configure wont find X, I think. error is: no graphics driver found. sl 10.6.8 – no fink, macports or homebrew installed)