Mike West — Web Application Developer

Using Matías Giovannini’s great instructions, I was (finally) able to get the GD library installed on OS X so I can build some charts in Perl. I’ve condensed his instructions into the shell commands that I actually needed to get everything installed, and record them here just in case I ever have to do it again. :)

1. Install zlib

curl -O http://www.zlib.net/zlib-1.2.3.tar.gz
tar -xzvf ./zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure --shared && make && sudo make install

2. Install libjpeg

curl -O ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
tar -xzvf ./
cd jpeg-6b
ln -s `which glibtool` ./libtool
export MACOSX_DEPLOYMENT_TARGET=10.4
./configure --enable-shared && make && sudo make install

3. Install libpng

curl -O ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.2.16.tar.gz
tar -xzvf ./libpng-1.2.16.tar.gz
cd libpng-1.2.16
./configure && make && sudo make install

4. Install freetype2

curl -O http://download.savannah.gnu.org/releases/freetype/freetype-2.3.4.tar.gz
tar -xzvf freetype-2.3.4.tar.gz
cd freetype-2.3.4
./configure && make && sudo make install

5. Install libgd

curl -O http://libgd.org/releases/gd-2.0.34.tar.gz
tar -xvzf ./gd-2.0.34.tar.gz
cd gd-2.0.34
sudo ln -s /usr/X11R6/include/fontconfig /usr/local/include
./configure && make && sudo make install

6. Celebrate!

I celebrated by installing GD::Graph via CPAN, you might prefer something more suitably exciting. :)

Mike West is a web application developer living in Munich, Germany. Professionally programming for the web since 2000, he's available for contract work now a web developer at Yahoo! Germany. Read Mike's bio, or drop him an e-mail.

Recent Articles


Comments

Hello Mike , I am trying to install gd-2.0.34 on my linux machine. when i am trying to make the tool i am getting the following error. can please help me find a fix

cd . && /bin/sh /home/tigbts/Natzilla/perl5.0/build/gd-2.0.34/config/missing —run autoheader configure.ac:28: error: Autoconf version 2.58 or higher is required aclocal.m4:7856: AM_INIT_AUTOMAKE is expanded from… configure.ac:28: the top level autom4te: /usr/bin/m4 failed with exit status: 1 autoheader: /usr/bin/autom4te failed with exit status: 1 make: *** [config.hin] Error 1 regards, Jagan

Posted By: jagan 25. May 2007, 12:05

thanks mike! i’d be looking for instructions onhow todo exactly this and it worked a treat.

Posted By: evan 11. August 2007, 10:37

Comments Closed

Comments are closed after 6 weeks to avoid the icky comment spam we all loathe. Sorry if you missed the opportunity, but you can always drop me an e-mail!

flickr Photostream

Yahoo!'s Munich Office
atom:title
atom:title
atom:title