在已经编译安装好php7场景下,install gd库 with free-type (解决Call to undefined function   imagettftext())

install gd with free-type 有free-type才能支持php的imagettftext()图片处理函数

cd /root/php7/php-7.2.31/ext/gd #进入安装源文件的gd扩展文件
./configure --with-php-config=/usr/local/php746/bin/php-config   --with-freetype-dir=/usr/include/freetype2  #注意要写对该已经安装的freetype地址,本地址是centos6.5地址,可以用yum install freetype安装
make
make test 查看make是否有错误 经测试有时候虽然有报错,看看错误内容,如果影响不大,继续执行make install也是可以执行成功的,只是报错中涉及到的部分内容可能无法支持
make install

内容来源于网络如有侵权请私信删除

文章来源: 博客园

原文链接: https://www.cnblogs.com/qiangshangkeji/p/13054252.html

你还没有登录,请先登录注册
  • 还没有人评论,欢迎说说您的想法!