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后解决办法。

configure: error: GD build test failed. Please check the config.log相关推荐

  1. C++ preprocessor /lib/cpp fails sanity check See `config.log' for more details

    Ubuntu 12.04环境下编译xapian时报此错误,因为从来没有在此系统下跑过C++,所以用C++编译器的时候出现此问题 出现该情况是由于c++编译器的相关package没有安装,以root用户 ...

  2. linux下编译isl,GCC编译器升级./configure报错“configure: error: Unable to find a usable ISL.”解决办法...

    现象: GCC编译器升级时,./configure报错"configure: error: Unable to find a usable ISL. See config.log for d ...

  3. gmp4.3.2 安装 configure: error: could not find a working compiler

    今天在虚拟机上想安装gcc4.7.2 但貌似有三个依赖. 那就顺序装吧. 装到gmp的时候.怎么都configure不过去,各种查各种不行,但是我之前在别的机器装成功过. 刚开始一直以为是某个编译程序 ...

  4. configure: error: C compiler cannot create executables错误解析

    一. 前言 在编译开源软件的时候,有时会遇到"configure: error: C compiler cannot create executables"的错误,表示不能生成可执 ...

  5. 编译安装PHP出现configure: error: MySQL configure failed. Please check config.log的解决方法

    以下为google的结果: 方案一: 转载链接:http://www.php-oa.com/2008/03/28/php-make.html 好久没有编译安装过php了,为了玩nginx.没法子,编译 ...

  6. ARM平台编译dante出现【configure: error: cannot guess build type; you must specify one】解决方法

    编译dante的时候出现: root@ak:~/dante-1.4.2# ./configure --prefix=/usr/local/dante --sysconfdir=/etc --disab ...

  7. 安装php时,configure: error: xml2-config not found. Please check your libxml2 installation

    参考文章:http://blog.csdn.net/anljf/article/details/6981247 安装php时的报错 configure: error: xml2-config not ...

  8. Mac安装webpack报错gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1解决

    安装webpack ,报错提示 gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1 gyp ER ...

  9. configure: error: xml2-config not found. Please check your libxml2 installation

    安装php时的报错 checking libxml2 install dir... no checking for xml2-config path...  configure: error: xml ...

最新文章

  1. URAL - 1902 Neo-Venice
  2. 学习 spring-boot (一)
  3. 把文件自动add_【Blender】常用Add-Ons
  4. 我对浮动的认识(一)
  5. MySQL命令行下执行.sql脚本详解
  6. 没有双11的美团,被饿了么突袭“下沉粮仓”
  7. 芯片-模组-开发板-软件开发包SDK(Software Development Kit)的关系(软件开发人员必须了解的硬件知识)
  8. 当session会话结束时,重定向到登录页显示在iframe框内的问题
  9. 使用Java操作汉字编码的一个例子
  10. 张高兴的 Windows 10 IoT 开发笔记:三轴数字罗盘 HMC5883L
  11. 地震数据剖面图-matlab
  12. 正则表达式常用操作符
  13. 如何把WORD文档中的其中一页转为横向,其它页不变,仍为纵向
  14. html树状图在线画板,五款在线思维导图工具,总有一款适合你
  15. .NET 经常被面试官问到的问题
  16. 完整且详细的单链表代码
  17. 关于kernels启动报错的问题
  18. Linux命令之查找命令
  19. 笑看万物锘锘锘 php,如何用一句话证明你是程序员?41 个答案揭晓!
  20. Hadoop Applier

热门文章

  1. 云服务器什么配置才够用?
  2. python让手机关机_Python 神操作:远程开机和关机
  3. 02 SVN 与 Git 的优缺点
  4. 证券教父阚治东出手:UU跑腿获2亿元B轮融资
  5. 趣图 | 早起的你 vs 熬夜的你
  6. 命令执行(ctfshow)
  7. python list diff_PythonList交集,并集,差集的应用
  8. 北大学霸隐居20年,王青松花光350万后,如今怎么样了?
  9. 华为光伏usb适配器_支持22.5W超级快充无线充电,华为P40手机保护壳深度拆解
  10. NO.119 不懂语言代码,超级菜鸟的建站分享(二):界面设置。