configure: error: GD build test failed. Please check the config.log



Linux 源代码包配置PHP时出错:configure: error: GD build test failed. Please check the config.log

Ps: 正确解答此问题者,追加200分!不够的还可以增加!谢谢啊!
无语啊。。。本来已经搭建好的源码环境,结果由于PHP版本太高,无法用Zend ZendOptimizer。我就把PHP5.6.4给卸载了,然后想装一个5.2.6的:
结果在配置时始终出错啊:
配置语句:
# ./configure --prefix=/usr/local/php/ --with-config-file-path=/usr/local/php/etc/ --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql/ --with-libxml-dir=/usr/local/libxml2/ --with-jpeg-dir=/usr/local/jpeg6/ --with-png-dir=/usr/local/libpng/ --with-freetype-dir=/usr/local/freetype/ --with-gd=/usr/local/gd2 --with-mcrypt=/usr/local/libmcrypt/ --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-soap --enable-mbstring=all --enable-sockets
出错信息为:
configure: error: GD build test failed. Please check the config.log for details.
# cat config.log
发现错误如下(由于字数限制,下面省略了一些行):
/usr/local/gd2/lib/libgd.so: undefined reference to `jpeg_destroy_decompress@LIBJPEG_6.2'
/usr/local/gd2/lib/libgd.so: undefined reference to `jpeg_CreateCompress@LIBJPEG_6.2'
/usr/local/gd2/lib/libgd.so: undefined reference to `jpeg_read_header@LIBJPEG_6.2'
/usr/local/gd2/lib/libgd.so: undefined reference to `jpeg_read_scanlines@LIBJPEG_6.2'
/usr/local/gd2/lib/libgd.so: undefined reference to `jpeg_start_compress@LIBJPEG_6.2'
/usr/local/gd2/lib/libgd.so: undefined reference to `jpeg_destroy_compress@LIBJPEG_6.2'
…………
/usr/local/gd2/lib/libgd.so: undefined reference to `jpeg_std_error@LIBJPEG_6.2'
/usr/local/gd2/lib/libgd.so: undefined reference to `jpeg_finish_compress@LIBJPEG_6.2'
这样的错误在config.log这个文件中出现了很多次。自己已经重装了jpeg6,重装了GD,都不行。。请问如何解决,非常感谢!
此问题已自己解决


./configure --prefix=/usr/local/php/ --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/php/lib/ --with-config-file-scan-dir=/usr/local/etc/ --with-zlib --with-curl --enable-bcmath --with-jpeg-dir --with-png-dir --with-xpm-dir --with-freetype-dir --with-gd --with-mhash --enable-mbstring --with-mcrypt --with-libxml-dir --with-iconv-dir --with-pcre-dir --enable-mysqlnd --with-mysql=mysqlnd --with-mysqli=mysqlnd
看一下是不是有库不全?


安装 php 5.5.25 多加了参数 --with-gd=/usr/local/gd
/usr/local/gd = 2.0.35   升级 2.44 之后 报错 如下解决:
 
[root@s php-5.5.25]# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql/ --with-libxml-dir=/usr/local/libxml2/ --with-png-dir=/usr/local/libpng/ --with-jpeg-dir=/usr/local/jpeg/ --with-freetype-dir=/usr/local/freetype/ --with-gd --with-mcrypt=/usr/local/libmcrypt/ --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-soap --enable-mbstring=all --enable-sockets




 解决:
--with-gd=/usr/local/gd2

换成系统gd试试
--with-gd
                     升级php gd库2.0.35 为 GD-2.44后解决办法。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值