首先卸载老版本gd库
rpm -qa |grep gd 查gd
rpm -e gd-1.8.4-11 卸载旧版gd
rpm -e gd-devel-1.8.4-11
rpm -e gd-1.8.4-11
重新编译gd
./configure --prefix=/usr/local/gd --with-jpeg-dir=/usr/local/jpeg --with-png --with-zlib --with-freetype=/opt/freetype
重新编译php
cd /.../php5.16
make clean
./configure --enable-ftp --with-gd=/usr/local/gd --with-freetype-dir=/opt/freetype --with-mysql=/usr/local/mysql --enable-track-vars --with-apxs2=/usr/local/apache2/bin/apxs --with-zlib --wi
th-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --enable-mbstring --with-ttf --enable-socket
重启apache
/usr/local/apache2/bin/apachectl -k stop
/usr/local/apache2/bin/apachectl -k start

