php-5.6.3编译时出错解决方法

[root@lrj-centos6 php-5.6.3]# make

/bin/sh /usr/local/src/php-5.6.3/libtool --silent --preserve-dup-deps --mode=compile cc -I/usr/local/src/php-5.6.3/ext/gd/libgd -DHAVE_LIBPNG -DHAVE_LIBVPX -DHAVE_LIBJPEG -DHAVE_XPM -DHAVE_LIBFREETYPE -DENABLE_GD_TTF -Iext/gd/ -I/usr/local/src/php-5.6.3/ext/gd/ -DPHP_ATOM_INC -I/usr/local/src/php-5.6.3/include -I/usr/local/src/php-5.6.3/main -I/usr/local/src/php-5.6.3 -I/usr/local/src/php-5.6.3/ext/date/lib -I/usr/local/src/php-5.6.3/ext/ereg/regex -I/usr/include/libxml2 -I/usr/local/zlib/include -I/usr/local/libvpx//include -I/usr/local/jpeg/include -I/usr/local/libpng/include -I/usr//X11 -I/usr/local/libpng/include/freetype2 -I/usr/local/t1lib/include -I/usr/local/src/php-5.6.3/ext/mbstring/oniguruma -I/usr/local/src/php-5.6.3/ext/mbstring/libmbfl -I/usr/local/src/php-5.6.3/ext/mbstring/libmbfl/mbfl -I/usr/local/include -I/usr/local/mysql/include -I/usr/local/src/php-5.6.3/ext/sqlite3/libsqlite -I/usr/local/src/php-5.6.3/ext/zip/lib -I/usr/local/src/php-5.6.3/TSRM -I/usr/local/src/php-5.6.3/Zend    -I/usr/include -g -O2 -fvisibility=hidden  -c /usr/local/src/php-5.6.3/ext/gd/gd.c -o ext/gd/gd.lo 

在包含自 /usr/local/src/php-5.6.3/ext/gd/gd.c80 的文件中:

/usr/include/ft2build.h:56:38: 错误:freetype/config/ftheader.h:没有那个文件或目录

/usr/local/src/php-5.6.3/ext/gd/gd.c:81:12: 错误:#include 需要 "FILENAME" 或 <FILENAME>

make: *** [ext/gd/gd.lo] 错误 1

 

[root@lrj-centos6 gd]# vi gd.c

wKioL1Zil2SSijWtAAA5rS1jJgY318.jpg


 

[root@lrj-centos6 gd]# vi /usr/include/ft2build.h

wKioL1Zil5TTDdp_AAPePnOKr2o680.jpg

 

[root@lrj-centos6 gd]# cat freetype/config/ftheader.h

cat: freetype/config/ftheader.h: 没有那个文件或目录

 

解决办法:建立键接目录

  ln -s /usr/include/freetype2/freetype/ /usr/include/freetype  


你可能感兴趣的:(PHP)