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

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
简介: <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后解决办法。

相关实践学习
日志服务之使用Nginx模式采集日志
本文介绍如何通过日志服务控制台创建Nginx模式的Logtail配置快速采集Nginx日志并进行多维度分析。
目录
相关文章
|
3月前
|
机器学习/深度学习 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
46 0
|
5月前
|
Java
解决:Config service failed to start in 120 seconds! Please check ./service/apollo-service.log...
解决:Config service failed to start in 120 seconds! Please check ./service/apollo-service.log...
56 0
|
6月前
|
JavaScript Cloud Native Go
Error: Cannot find module ‘webpack/bin/config-yargs‘ at Function.Module._resolveFilename (intern
Error: Cannot find module ‘webpack/bin/config-yargs‘ at Function.Module._resolveFilename (intern
30 0
|
开发工具 git
error: could not lock config file .git/config: Permission denied/Command failed with exit 255
error: could not lock config file .git/config: Permission denied/Command failed with exit 255
282 0
|
Java iOS开发
Mac编译OpenJDK8:configure: error: Xcode 4 is required to build JDK 8, the version found was 10.1config
Mac编译OpenJDK8:configure: error: Xcode 4 is required to build JDK 8, the version found was 10.1config
93 0
checking build system type... ./config.guess: unable to guess system type/you must specify one
checking build system type... ./config.guess: unable to guess system type/you must specify one
99 0
Error: Cannot find module ‘webpack-cli/bin/config-yargs‘
Error: Cannot find module ‘webpack-cli/bin/config-yargs‘
Error: Cannot find module ‘webpack-cli/bin/config-yargs‘
解决报错信息 —— Error: Cannot find module ‘webpack-cli/bin/config-yargs’
解决报错信息 —— Error: Cannot find module ‘webpack-cli/bin/config-yargs’
242 0
|
JavaScript
Vue Webpack 异常:Error: Cannot find module 'webpack/bin/config-yargs'
异常 异常.png 原因 webpack与webpack-dev-server版本不兼容导致 解决方法 修改package.json文件中的webpack与webpack-dev-server版本相对应 ...
4059 0

热门文章

最新文章