The last couple of days I had to install ImageMagick on some different MacBook’s and seeing that there are still some users out there which don’t have any success installing that I thought I do a post about how to install ImageMagick the right way.
I am using a MacBook Pro with MacOS X 10.4.10 installed, if that matters.
1. Download the latest Binary Release for MacOS X
As of this writing the latest ImageMagick release is at version 6.3.5 and can be found at this download location.
2. Uncompress the archive
Open up a terminal window and “cd” to the download directory. Then, again using the terminal, uncompress the archive with the following command:
tar -xzvf mageMagick-universal-apple-darwin8.10.1.tar.gz
This will create a directory of the name “ImageMagick-6.3.5″. Now move this directory to the “/usr” directory with the following command:
mv ImageMagick-6.3.5 /usr/.
3. Create a Symbolic link
Actually this is not needed but it will make installing future releases of ImageMagick a breeze. With a symbolic link you will just use the name “ImageMagick” and don’t need to change any variable settings (explained in the nest steps) for a new version. to create a symbolic link issue the following commands:
cd /usrln -s ImageMagick-6.3.5 ImageMagick
So the next time you have a new version simply use the above command to create a symbolic link to the new version with the link to the new version’s folder and all your scripts still work.
4. Set the environment variables
ImageMagick is a command line utility and this needs to know where it’s libraries are and for that we need to set some environment variables. Since we don’t want to set those variables every time when we start up our machine we add those variables setting to our temrinal session settings file. For MacOS X 10.4 the default shell is either “sh” or “bash”. in that case we edit the “.profile” file. Doing so we will use the “vi” editor. To do so enter the following command in a terminal session window:
vi ~/.profile
this will open up the .profile file (which is a hidden system file) in the “vi” editor”. “VI” is one of the oldest editors around and is the favorite among Unix administrators. The only thing that might be strange when you are confronted with “vi” the first time, is its usage. It mainly consists of entering short commands and has a two side mode. Anyhow, for editing this file simply follow the steps here.
1. Scroll down all the way and hit “i” (for insert).
2. Copy the following 3 lines and paste them into the editor (yes, you can copy and paste directly from your browser into the shell):
export MAGICK_HOME=”/usr/ImageMagick”export DYLD_LIBRARY_PATH=”$MAGICK_HOME/lib”
export PATH; PATH=”$MAGICK_HOME/bin:$PATH”
3. Hit the “esc” key ONE time.
4. Enter “:x” and hit the “enter” key (this saves the file)
5. Quit your terminal session.
6. Check the environment variables
Open up a terminal session again and enter “env”. In the long list you should see that the environment variables which we set above on screen. If not, then repeat the steps above and check for the right syntax.
7. Test the installation
Now you can test your installation with:
convert logo: logo.gif
You should now have a “logo.gif” in the directory you used this command which can be opened in preview.
If you have a error message saying: “dyld: Library not loaded: /usr/X11R6/lib/libXext.6.dylib” then you will need to install “X11″ first. For 10.4 users: The installation of “X11″ can be found on your MacOS X Installation DVD. Execute “Optional Installs” and under “Applications” choose “X11″ to install the application. For all other users Apple has the X11 package online available at their download site. Note: This is the X11 user package and not the X11SDK package.
Voila, that’s it. Congratulation you just became a ImageMagick installation god.

