常见 PHP (5.4.24) 编译错误解决方法[备忘]

简介: 参见编译错误信息 configure: error: GD build test failed. Please check the config.log for details. 解决方法:  把编译包全部安装 export LANG=en_USyum grouplist | grep Deveyum groupinstall -y "返回的包组名称" 返回的包组名称" 返回

参见编译错误信息

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


解决方法:  把编译包全部安装

export LANG=en_US
yum grouplist | grep Deve
yum groupinstall -y "返回的包组名称" 返回的包组名称" 返回的包组名称"

 

 

参见编译错误信息

/root/rpmbuild/BUILD/php-5.4.24/ext/gd/gd_ctx.c: In function '_php_image_stream_putc':
/root/rpmbuild/BUILD/php-5.4.24/ext/gd/gd_ctx.c:51: error: 'struct gdIOCtx' has no member named 'data'
/root/rpmbuild/BUILD/php-5.4.24/ext/gd/gd_ctx.c: In function '_php_image_stream_putbuf':
/root/rpmbuild/BUILD/php-5.4.24/ext/gd/gd_ctx.c:58: error: 'struct gdIOCtx' has no member named 'data'
/root/rpmbuild/BUILD/php-5.4.24/ext/gd/gd_ctx.c: In function '_php_image_stream_ctxfree':
/root/rpmbuild/BUILD/php-5.4.24/ext/gd/gd_ctx.c:67: error: 'struct gdIOCtx' has no member named 'data'
/root/rpmbuild/BUILD/php-5.4.24/ext/gd/gd_ctx.c:68: error: 'struct gdIOCtx' has no member named 'data'
/root/rpmbuild/BUILD/php-5.4.24/ext/gd/gd_ctx.c:69: error: 'struct gdIOCtx' has no member named 'data'
In file included from /root/rpmbuild/BUILD/php-5.4.24/ext/gd/gd.c:103:
/root/rpmbuild/BUILD/php-5.4.24/ext/gd/gd_ctx.c: In function '_php_image_output_ctx':
/root/rpmbuild/BUILD/php-5.4.24/ext/gd/gd_ctx.c:153: error: 'gdIOCtx' has no member named 'data'
make: *** [ext/gd/gd.lo] Error 1
make: *** Waiting for unfinished jobs....
error: Bad exit status from /var/tmp/rpm-tmp.BgnmAM (%build)


解决方法 *编辑你的 GD 安装的头文件 gd_io.h  不知道在哪里就用 find 命令寻找一下吧.*

cp /apps/lib/gd-2.0.35/include/gd_io.h /apps/lib/gd-2.0.35/include/gd_io.h.bak
vi /apps/lib/gd-2.0.35/include/gd_io.h
typedef struct gdIOCtx
{
  int (*getC) (struct gdIOCtx *);
  int (*getBuf) (struct gdIOCtx *, void *, int);

  void (*putC) (struct gdIOCtx *, int);
  int (*putBuf) (struct gdIOCtx *, const void *, int);

  /* seek must return 1 on SUCCESS, 0 on FAILURE. Unlike fseek! */
  int (*seek) (struct gdIOCtx *, const int);

  long (*tell) (struct gdIOCtx *);

  void (*gd_free) (struct gdIOCtx *);

  void (*data);

}


添加 void (*data); 则可通过编译

 

参见下面错误信息

/usr/src/php-5.4.24/sapi/cli/php: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory


库文件没有找到, 加载一下就可以了.

[root@gd02-qa-plxt2-nodomain php-5.4.24]# echo /apps/lib/openssl-1.0.0d/lib >> /etc/ld.so.conf.d/php.conf
[root@gd02-qa-plxt2-nodomain php-5.4.24]# ldconfig
目录
相关文章
|
10月前
|
SQL 安全 程序员
PHP编程中的关键性错误及解决方法
在PHP编程过程中,程序员常常会遇到一些关键性错误,这些错误可能会导致程序运行异常甚至崩溃。本文将重点探讨PHP编程中常见的关键性错误,并提供解决方法,帮助程序员更好地应对这些问题,提高编程效率和代码质量。
53 1
没有可用的软件包 php5-mysql,但是它被其它的软件包引用了。解决方法
没有可用的软件包 php5-mysql,但是它被其它的软件包引用了。解决方法
285 0
|
4月前
|
数据采集 网络安全 PHP
用PHP抓取HTTPS资源时的常见问题与解决方法
本文探讨了在PHP中抓取HTTPS资源时常见的问题及其解决方案,包括SSL证书验证、反爬机制应对、HTTPS代理设置及提高抓取效率。通过代码示例展示了如何使用代理IP和合理设置请求头等方法,以高效获取贝壳网的房价数据。
|
7月前
|
应用服务中间件 Linux 网络安全
【Azure 应用服务】PHP应用部署在App Service for Linux环境中,上传文件大于1MB时,遇见了413 Request Entity Too Large 错误的解决方法
【Azure 应用服务】PHP应用部署在App Service for Linux环境中,上传文件大于1MB时,遇见了413 Request Entity Too Large 错误的解决方法
|
9月前
|
应用服务中间件 Linux 网络安全
PHP应用部署在App Service for Linux环境中,上传文件大于1MB时,遇见了413 Request Entity Too Large 错误的解决方法
在Azure App Service for Linux上部署的PHP应用遇到上传文件超过1MB时出现413 Request Entity Too Large错误的解决之法
252 0
|
PHP Windows
windows下 Call to undefined function posix_getpid() in ……\Workerman\Worker.php 的解决方法
windows下 Call to undefined function posix_getpid() in ……\Workerman\Worker.php 的解决方法
232 0
windows下 Call to undefined function posix_getpid() in ……\Workerman\Worker.php 的解决方法
|
自然语言处理 PHP
PHP的编译过程是怎样的?底层原理是什么?
PHP的编译过程是怎样的?底层原理是什么?
231 0
|
自然语言处理 PHP
Zend 引擎首先将 PHP 代码编译为中间代码,中间代码是干什么的?底层原理是什么?
Zend 引擎首先将 PHP 代码编译为中间代码,中间代码是干什么的?底层原理是什么?
177 0

热门文章

最新文章