首页 > Web开发 > 详细

给php增加gd库(转)

时间:2014-11-16 15:52:51      阅读:322      评论:0      收藏:0      [点我收藏+]

1.安装zlib 
tar zxvf zlib-1.2.3.tar.gz 
cd zlib-1.2.3 
./configure --prefix=/usr/local/zlib
make 
make install 

2.安装libpng 
tar zxvf libpng-1.2.8.tar.tar 
cd libpng-1.2.8
mv ./scripts/makefile.linux ./makefile 
make 
make install 
注意,这里的makefile不是用./configure生成,而是直接从scripts/里拷一个 

3.安装freetype 
tar zxvf freetype-2.1.10.tar.gz 
cd freetype-2.1.10 
./configure --prefix=/usr/local/freetype
make 
make install 

4.安装Jpeg 
tar zxvf jpegsrc.v6b.tar.gz 
cd jpeg-6b/ 
./configure --prefix=/usr/local/jpeg6 --enable-shared --enable-static
make
make install
注意,这里configure一定要带--enable-shared参数,不然,不会生成共享库 

5.安装GD 
tar zxvf gd-2.0.33.tar.gz 
cd gd-2.0.33 
./configure --with-png --with-jpeg --with-freetype=/usr/local/freetype
make
make install 

6.重新编译PHP 
tar zxvf php-4.3.9.tar.gz 
cd php-4.3.9 
./configure (以前的参数) --with-gd --enable-gd-native-ttf --with-zlib-dir=/usr/local/zlib --with-png --with-jpeg --with-freetype-dir=/usr/local/freetype
make 
make install

给php增加gd库(转)

原文:http://www.cnblogs.com/zx-admin/p/4101430.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!