php添加FreeType 库支持

>刚编译了一个lamp,上线后发现验证码无法显示, 和网站沟通后,说是imagettftext()。 
函数同时需要 GD 库和 FreeType 库。 通过产查看phpinfo();后发现没有freetype的支持, 
下面是添加freetype支持的方法

 

cd /usr/src/php.5.4.4

cat config.nice      -->这个是你上次成功编译的参数

我的系统是centos6.2 X86_64的  freetype的位置在    /usr/include/freetype2/freetype/

不知道的同学, 可以通过find / -name freetype* 进行查找,

之后在编译配置的参数上添加上   --with-freetype-dir=/usr/include/freetype2/freetype/ 就ok了

另外贴一下我的配置参数

'./configure' \
'--prefix=/usr/local/php' \
'--enable-mbstring' \
'--with-apxs2=/usr/local/apache/bin/apxs' \
'--with-mysql=/usr/local/mysql' \
'--with-config-file-path=/usr/local/php' \
'--enable-session' \
'--with-bz2' \
'--with-gd' \
'--enable-sockets' \
'--with-freetype-dir=/usr/include/freetype2/freetype/' \

转载于:https://www.cnblogs.com/mazefeng/p/3359812.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值