composer安装,缺少gd库,编译安装gd报错?
程序员文章站
2024-01-15 13:30:40
...
错误代码如下
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一下就有方法的
上一篇: MySQL 优化(七)