Install RMagick on Mac OS X Leopard from Source 13

Posted by Ben Reubenstein Sun, 16 Mar 2008 21:50:00 GMT

Here are the commands I used to compile the required libraries and programs for RMagick to work on Mac OS X 10.5. It is largely the same as this article with slight adjustments. After completing the process I dumped my history.

Before you can execute these commands, you MUST HAVE

Begin by creating a folder to hold the src.

cd ~
mkdir src
cd src

wget

I like wget, which I use in the commands below. To start compile that or replace the wget command with curl -O.

curl -O http://ftp.gnu.org/gnu/wget/wget-latest.tar.gz
tar -zxvf wget-latest.tar.gz 
cd wget-1.11/
./configure --prefix=/usr/local
make
sudo make install
cd ..

FreeType

wget http://download.savannah.gnu.org/releases/freetype/freetype-2.3.5.tar.gz
tar zxvf freetype-2.3.5.tar.gz 
cd freetype-2.3.5
./configure --prefix=/usr/local
make
sudo make install
cd ..

PNG Library

wget http://internap.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.25.tar.gz
tar -zxvf libpng-1.2.25.tar.gz 
cd libpng-1.2.25
./configure --prefix=/usr/local
make
sudo make install
cd ..

JPEG Library

wget ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
tar -zxvf jpegsrc.v6b.tar.gz 
cd jpeg-6b/
ln -s `which glibtool` ./libtool
export MACOSX_DEPLOYMENT_TARGET=10.5
./configure --enable-shared --prefix=/usr/local
make
sudo make install
cd ..

TIFF Library

wget ftp://ftp.remotesensing.org/libtiff/tiff-3.8.2.tar.gz
tar -zxvf tiff-3.8.2.tar.gz 
cd tiff-3.8.2
./configure --prefix=/usr/local
make 
sudo make install
cd ..

GhostScript Fonts

wget http://superb-east.dl.sourceforge.net/sourceforge/gs-fonts/ghostscript-fonts-std-8.11.tar.gz
tar -zxvf ghostscript-fonts-std-8.11.tar.gz 
sudo mkdir /usr/local/share/ghostscript
sudo mv fonts/ /usr/local/share/ghostscript/fonts/

ImageMagick

wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
tar zxvf ImageMagick.tar.gz 
cd ImageMagick-6.3.9/
export CPPFLAGS=-I/usr/local/include
export LDFLAGS=-L/usr/local/lib
./configure --prefix=/usr/local  --disable-static --with-modules --without-perl  --without-magick-plus-plus --with-quantum-depth=8  --with-gs-font-dir=/usr/local/share/ghostscript/fonts
make
sudo make install
cd ..

RMagick

sudo gem install rmagick

MiniMagick

sudo gem install mini_magick

Clean Up

cd ~
rm -Rfv ./src
Comments

Leave a comment

  1. Avatar
    James about 12 hours later:

    Ben, I have no idea what any of that means. Guess that's why you're way smarter than I am

  2. Avatar
    Justin about 1 month later:

    Thanks nice tutorial. Also ImageMagick is now -v 6.4.0 might want to change " cd ImageMagick-6.3.9/ " could confuse some slow ones. :)

  3. Avatar
    Robert about 1 month later:

    Works great.

    Thanks for the detailed steps.

  4. Avatar
    Michael D. Ivey about 1 month later:

    Thanks Ben. I'm a late-adopter on Leopard, and forgot to add this to my todo list. You saved me an hour or so of searching and fiddling with ./config options tonight, when I actually needed it.

    I reeeaaally wish someone would make a ports-like system that used the built-in libraries.

  5. Avatar
    murphy about 1 month later:

    Thank you, it works!

  6. Avatar
    ling about 1 month later:

    Thanks for the tutorial. I think this worked. Is there any way to check.

    Also, if I wanted to reinstall all of this, how do I do a roll back and start the procedure all over?

  7. Avatar
    kmcital 4 months later:

    Thanks! After two failed attempts, I found your instructions and it works!

  8. Avatar
    Solomon 5 months later:

    this video is gay and the tutorial

  9. Avatar
    clindsey 7 months later:

    Error ”/usr/local/man/man1/cjpeg.1: No such file or directory” indicates that the directory /usr/local/man/man1 doesn’t exist, create it before running the install.

  10. Avatar
    Andrew Degenhardt 11 months later:

    when installing jpeg-6b, on my Leopard, i modified the configure script because ltconfig wasnt working, said it couldnt find host type. I had to modify the script JUST AFTER extracting the files.

    find the first instance of ltconfig in the configure file, change it to this:

    $srcdir/ltconfig $disableshared $disablestatic $srcdir/ltmain.sh powerpc-apple-bsd

  11. Avatar
    andrew degenhardt 11 months later:

    yes thank you benr75. it works great. path is vital too. learned that.

  12. Avatar
    jtmk about 1 year later:

    when entering the directory for wget, dont forget to use what version it loaded... as i write this, it's 1.11.4

  13. Avatar
    jtmk about 1 year later:

    worked great! I changed version names accordingly.

Comments