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

简介: <p><br></p> <p></p> <p><br></p> <div class="wgt-ask accuse-response line mod-shadow" id="wgt-ask" style="padding:20px 60px 18px; position:relative; z-index:1; line-height:20px; margin-bottom:4p



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

相关实践学习
【涂鸦即艺术】基于云应用开发平台CAP部署AI实时生图绘板
【涂鸦即艺术】基于云应用开发平台CAP部署AI实时生图绘板
目录
相关文章
|
缓存 关系型数据库 MySQL
error: Failed dependencies: mariadb-connector-c-config is obsoleted by mysql-community-server-8.0.36-1.el7.x86_64 问题解决
error: Failed dependencies: mariadb-connector-c-config is obsoleted by mysql-community-server-8.0.36-1.el7.x86_64 问题解决
965 19
|
JavaScript API
Vue3 运行可以,build 打包发布报错,app.config.globalProperties 用法坑
Vue3 运行可以,build 打包发布报错,app.config.globalProperties 用法坑
368 2
|
Linux 开发工具 数据安全/隐私保护
【Deepin 20系统】Linux系统开机显示Failed to start Rotate log files
如果解决了该问题,系统仍然进不去不要惊慌,继续排查下一个错误。
375 4
|
开发工具 git
*** Please tell me who you are.Run git config --global user.email “you@example.com“ git confi
*** Please tell me who you are.Run git config --global user.email “you@example.com“ git confi
ESLint—— Failed to load config "standard" to extend from
ESLint—— Failed to load config "standard" to extend from
280 0
|
Ubuntu Python
ubuntu build install python3.12 and config pip
该脚本用于在 Ubuntu 上编译安装 Python 3.12,并配置 pip 使用国内镜像源。主要步骤包括安装依赖、下载并解压 Python 源码、编译安装、创建符号链接、配置 pip 源,以及验证安装和更新 pip。通过运行此脚本,可以快速完成 Python 3.12 的安装和配置。
1494 0
|
JavaScript
Parsing error: No Babel config file detected for 。。
Parsing error: No Babel config file detected for 。。
413 3
|
JavaScript 前端开发
ESLint—— Failed to load config “standard“ to extend from
ESLint—— Failed to load config “standard“ to extend from
475 0
|
机器学习/深度学习 Java Android开发
记录一个Flutter运行的异常FAILURE: Build failed with an exception. What went wrong: A problem occurred config
记录一个Flutter运行的异常FAILURE: Build failed with an exception. What went wrong: A problem occurred config
720 0