常见 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
目录
相关文章
|
自然语言处理 PHP
PHP的编译过程是怎样的?底层原理是什么?
PHP的编译过程是怎样的?底层原理是什么?
125 0
|
11月前
|
安全 PHP 数据库
php环境无法上传文件的解决方法
php环境无法上传文件的解决方法
139 0
PHP实现截取中文字符串不出现?号的解决方法
PHP实现截取中文字符串不出现?号的解决方法
|
自然语言处理 PHP
Zend 引擎首先将 PHP 代码编译为中间代码,中间代码是干什么的?底层原理是什么?
Zend 引擎首先将 PHP 代码编译为中间代码,中间代码是干什么的?底层原理是什么?
117 0
|
SQL PHP 数据库
php一次性大量数据入库解决方法
php一次性大量数据入库解决方法
69 0
|
关系型数据库 MySQL PHP
Php的编译与配置| 学习笔记
快速学习Php的编译与配置。
98 0
|
关系型数据库 MySQL PHP
Php的编译与配置
一、分类 二、编译安装 三、如何添加一个模块 四、测试php安装正确性以及数据库连通性
|
PHP
php 生成唯一id的几种解决方法
php 生成唯一id的几种解决方法   网上查了下,有很多的方法 1、md5(time() . mt_rand(1,1000000));   这种方法有一定的概率会出现重复 2、php内置函数uniqid()   uniqid() 函数基于以微秒计的当前时间,生成一个唯一的 ID.   w3school参考手册有一句话:"由于基于系统时间,通过该函数生成的 ID 不是最佳的。
1161 0
|
Serverless API PHP
函数计算 php runtime 编译非内置的扩展
在本文中,以 `php-gd` 扩展为例, 我们讲解如果利用fcli 工具编译函数计算php runtime 中其他没有内置的扩展
3295 0