php如何安装freetype
2022-12-02 09:01:16
93
{{single.collect_count}}

php安装freetype的方法:首先执行命令“make && make install”安装freeType;然后安装GD包括freetype;接着切换到PHP ext源码目录;最后重启php服务即可。

php入门到就业线上直播课:进入学习
Apipost = Postman + Swagger + Mock + Jmeter 超好用的API调试工具:点击使用

推荐:《PHP视频教程

PHP Fatal error:Call to undefined function imagettftext()
登录后复制
错误提示是指GD库中缺少freetype库,你装了GD不一定就支持freetype,很多人理解错误,
登录后复制
freetype 不是一个独立的扩展,是附着在GD库上的。
登录后复制

freeType官方下载地址:https://www.freetype.org/download.html

第一步安装freeType

./configure --prefix=/usr/local/freetypemake && make install
登录后复制

第二步安装GD包括freetype

切换到PHP ext源码目录

/opt/php5/bin/phpize./configure --with-php-config=/opt/php5/bin/php-config --with-jpeg-dir=/usr/local/jpeg/lib --with-freetype-dir=/usr/local/freetype --enable-gd-native-ttfmake && make install
登录后复制

如果需安装 gd支持jpeg请参见 https://blog.csdn.net/coolpan123/article/details/72916802

如果没有安装过gd 把gd.so 写入php.ini

如果以前装过gd 直接重启php服务即可

以上就是php如何安装freetype的详细内容,更多请关注php中文网其它相关文章!

回帖
全部回帖({{commentCount}})
{{item.user.nickname}} {{item.user.group_title}} {{item.friend_time}}
{{item.content}}
{{item.comment_content_show ? '取消' : '回复'}} 删除
回帖
{{reply.user.nickname}} {{reply.user.group_title}} {{reply.friend_time}}
{{reply.content}}
{{reply.comment_content_show ? '取消' : '回复'}} 删除
回帖
收起
没有更多啦~
{{commentLoading ? '加载中...' : '查看更多评论'}}