PHP 最全编译安装 gd 库

安装gd依赖库

  freetype

wget http://download.savannah.gnu.org/releases/freetype/freetype-2.4.0.tar.gz

tar jxvf freetype-2.4.0.tar.gz

cd freetype-2.4.0

./configure --prefix=/usr/local/freetype

make && make install

 jpegsrc

wget http://www.ijg.org/files/jpegsrc.v9.tar.gz

tar -zxvf jpegsrc.v9.tar.gz

cd jpeg-9

./configure --prefix=/usr/local/jpeg 

make && make install

libpng

wget http://jaist.dl.sourceforge.net/project/libpng/libpng12/1.2.56/libpng-1.2.56.tar.gz 

tar -zxvf libpng-1.2.56.tar.gz

cd libpng-1.2.56
 
./configure --prefix=/usr/local/libpng
 
make && make install

安装 gd 库

cd /path/php-5.6.25

cd ext/gd

/usr/local/php/bin/phpize

./configure --with-php-config=/usr/local/php/bin/php-config  --with-jpeg-dir=/usr/local/jpeg  --with-png-dir=/usr/local/libpng   --with-freetype-dir=/usr/local/freetype
 
make && make install

其中with-php-config 为PHP相关目录   with-jpeg-dir  with-png-dir    with-freetype 分别与上面的configure 指定的prefix 安装路径保持一致

posted @   树下水月  阅读(214)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
点击右上角即可分享
微信分享提示