求助:PHP Version 4.3.4在Linux下编译GD库出错!

方托马斯 2006-02-17 11:34:46
编译GD库并提供FreeType2支持,使用的各种相关库版本如下:
zlib-1.2.3
libpng-1.2.8
jpegscr.v6b
gd-2.0.33
freetype-2.1.10
以上各种库都用的默认安装路径,PHP做为模块编译,参数如下:
./configure
--with-oci8
--with-apxs=/usr/local/apache/bin/apxs
--with-zlib-dir=/usr/local/lib
--with-iconv
--enable-pcntl
--with-jpeg-dir=/usr/local/lib
--with-png-dir=/usr/local/lib
--with-gd --with-ttf
--with-freetype-dir=/usr/local/lib
--enable-gd-native-ttf
在make的时候报错:
/bin/sh /root/php-4.3.4/libtool --silent --preserve-dup-deps --mode=compile gcc -I/root/php-4.3.4/ext/gd/libgd -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_LIBFREETYPE -Iext/gd/ -I/root/php-4.3.4/ext/gd/ -DPHP_ATOM_INC -I/root/php-4.3.4/include -I/root/php-4.3.4/main -I/root/php-4.3.4 -I/root/php-4.3.4/Zend -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/oracle/product/9.2.0/rdbms/public -I/opt/oracle/product/9.2.0/rdbms/demo -I/root/php-4.3.4/ext/xml/expat -I/root/php-4.3.4/TSRM -g -O2 -prefer-pic -c /root/php-4.3.4/ext/gd/libgd/gdft.c -o ext/gd/libgd/gdft.lo
In file included from /root/php-4.3.4/ext/gd/libgd/gdft.c:63:
/usr/local/include/freetype2/freetype/freetype.h:19:2: #error "`ft2build.h' hasn't been included yet!"
/usr/local/include/freetype2/freetype/freetype.h:20:2: #error "Please always use macros to include FreeType header files."
/usr/local/include/freetype2/freetype/freetype.h:21:2: #error "Example:"
/usr/local/include/freetype2/freetype/freetype.h:22:2: #error " #include <ft2build.h>"
/usr/local/include/freetype2/freetype/freetype.h:23:2: #error " #include FT_FREETYPE_H"
make: *** [ext/gd/libgd/gdft.lo] Error 1
请教高手这个错误是怎么回事?是因为版本问题还是什么问题?如何解决啊?相同的库我在另两台机器上安装都没问题,只是PHP版本分别为4.3.9和4.4.0,不知道为什么只在4.3.4上报错呢???
...全文
115 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
gu1dai 2006-02-17
  • 打赏
  • 举报
回复
为什么要用4.3.9呢?
php的模块对版本的要求很严格的,呵呵。
都得找对应的版本,你仔细检查下模块的版本是否对应。
方托马斯 2006-02-17
  • 打赏
  • 举报
回复
问题没有解决,应该是版本的问题,索性升级到4.4.0,一切OK~
感谢楼上兄弟关注~

21,887

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧