所需的源码包及下载:(也可以下载最新的安装包)
gd-2.0.35.tar.gz
http://www.libgd.org/releases/
jpegsrc.v6b.tar.gz
http://www.ijg.org/files/
libpng-1.2.24.tar.tar
http://sourceforge.net/projects/libpng/
zlib-1.2.3.tar.gz
http://sourceforge.net/projects/libpng/
freetype-2.3.5.tar.gz
http://sourceforge.net/projects/freetype/
安装步骤:
先安装zlib,freetype,libpng,jpeg,再装GD
装zlib
1
2
3
4
5tar zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure
make
make install安装libpng
1
2
3
4
5
6
7tar zxvf libpng-1.2.24.tar.tar
cd libpng-1.2.24
cd scripts/
mv makefile.linux ../makefile
cd ..
make
make install注意,这里的makefile不是用./configure生成,而是直接从scripts/里拷一个
安装freetype
1
2
3
4
5tar zxvf freetype-2.3.5.tar.gz
cd freetype-2.3.5
./configure
make
make install安装Jpeg
1
2
3
4
5
6tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b/
./configure –enable-shared
make
make test
make install注意,这里configure一定要带–enable-shared参数,不然,不会生成共享库
安装GD
1
2
3
4tar zxvf gd-2.0.35.tar.gz
cd gd-2.0.35
./configure -with-png -with-freetype -with-jpeg
make install