composer安装,缺少gd库,编译安装gd报错?
程序员文章站
2022-05-26 13:26:24
...
错误代码如下
root@ubuntu:~/lnmp/src/php-5.6.14/ext/gd# make && make install
/bin/bash /root/lnmp/src/php-5.6.14/ext/gd/libtool --mode=compile cc -I/root/lnmp/src/php-5.6.14/ext/gd/libgd -DHAVE_LIBPNG -I. -I/root/lnmp/src/php-5.6.14/ext/gd -DPHP_ATOM_INC -I/root/lnmp/src/php-5.6.14/ext/gd/include -I/root/lnmp/src/php-5.6.14/ext/gd/main -I/root/lnmp/src/php-5.6.14/ext/gd -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/lnmp/src/php-5.6.14/ext/gd/gd.c -o gd.lo
mkdir .libs
cc -I/root/lnmp/src/php-5.6.14/ext/gd/libgd -DHAVE_LIBPNG -I. -I/root/lnmp/src/php-5.6.14/ext/gd -DPHP_ATOM_INC -I/root/lnmp/src/php-5.6.14/ext/gd/include -I/root/lnmp/src/php-5.6.14/ext/gd/main -I/root/lnmp/src/php-5.6.14/ext/gd -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/lnmp/src/php-5.6.14/ext/gd/gd.c -fPIC -DPIC -o .libs/gd.o
/root/lnmp/src/php-5.6.14/ext/gd/gd.c:80:24: fatal error: ft2build.h: No such file or directory
# include
^
compilation terminated.
make: *** [gd.lo] Error 1
回复内容:
错误代码如下
root@ubuntu:~/lnmp/src/php-5.6.14/ext/gd# make && make install
/bin/bash /root/lnmp/src/php-5.6.14/ext/gd/libtool --mode=compile cc -I/root/lnmp/src/php-5.6.14/ext/gd/libgd -DHAVE_LIBPNG -I. -I/root/lnmp/src/php-5.6.14/ext/gd -DPHP_ATOM_INC -I/root/lnmp/src/php-5.6.14/ext/gd/include -I/root/lnmp/src/php-5.6.14/ext/gd/main -I/root/lnmp/src/php-5.6.14/ext/gd -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/lnmp/src/php-5.6.14/ext/gd/gd.c -o gd.lo
mkdir .libs
cc -I/root/lnmp/src/php-5.6.14/ext/gd/libgd -DHAVE_LIBPNG -I. -I/root/lnmp/src/php-5.6.14/ext/gd -DPHP_ATOM_INC -I/root/lnmp/src/php-5.6.14/ext/gd/include -I/root/lnmp/src/php-5.6.14/ext/gd/main -I/root/lnmp/src/php-5.6.14/ext/gd -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/lnmp/src/php-5.6.14/ext/gd/gd.c -fPIC -DPIC -o .libs/gd.o
/root/lnmp/src/php-5.6.14/ext/gd/gd.c:80:24: fatal error: ft2build.h: No such file or directory
# include
^
compilation terminated.
make: *** [gd.lo] Error 1
ft2build.h No such file or directory 是一个典型错误 你google一下就有方法的
上一篇: CSS制作图片水平垂直居中_html/css_WEB-ITnose
下一篇: 制定计划的几个技巧
推荐阅读
-
centos7 PHP环境搭建 GD库 等插件安装方法
-
Centos7下PHP安装gd库的实例讲解
-
ubuntu:通过封装验证码类库一步步安装php的gd扩展
-
PHP5安装GD库的具体操作步骤
-
已安装gd库,但仍提示Call to undefined function imagecreatefromjpeg()
-
在FreeBSD上安装GD库的问题解决_PHP教程
-
PHP中实现大图自动缩成小图(及GD库的安装)_PHP
-
"imageantialias" 此函数仅在与 GD 库捆绑编译的 PHP 版本中可用,只能编译php安装?
-
在FreeBSD上安装GD库的问题解决
-
linux php 安装GD库