安装php5.4.10时, 错误:‘gdIOCtx’ 没有名为 ‘data’ 的成员

安装php5.4.10时, 错误:‘gdIOCtx’ 没有名为 ‘data’ 的成员

在安装php时,报如下错误

In file included from /kk/php-5.4.0/ext/gd/gd.c:103:

/kk/php-5.4.0/ext/gd/gd_ctx.c: In function ‘_php_image_stream_putc’:

/kk/php-5.4.0/ext/gd/gd_ctx.c:51: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员

/kk/php-5.4.0/ext/gd/gd_ctx.c: In function ‘_php_image_stream_putbuf’:

/kk/php-5.4.0/ext/gd/gd_ctx.c:58: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员

/kk/php-5.4.0/ext/gd/gd_ctx.c: In function ‘_php_image_stream_ctxfree’:

/kk/php-5.4.0/ext/gd/gd_ctx.c:67: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员

/kk/php-5.4.0/ext/gd/gd_ctx.c:68: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员

/kk/php-5.4.0/ext/gd/gd_ctx.c:69: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员

/kk/php-5.4.0/ext/gd/gd_ctx.c: In function ‘_php_image_output_ctx’:

/kk/php-5.4.0/ext/gd/gd_ctx.c:153: 错误:‘gdIOCtx’ 没有名为 ‘data’ 的成员

make: *** [ext/gd/gd.lo] 错误 1

好像说这个错误算是php5.4的bug,下面对应的两篇文章有对应的说明:
https://bugs.php.net/bug.php?id=55224
https://bugs.php.net/bug.php?id=60108

解决方法

vi <gd_dir>/include/gd_io.h

gdIOCtx结构中增加void *data;

格式如下

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);//增加此项

}

gdIOCtx;

时间: 2024-08-11 00:57:22

安装php5.4.10时, 错误:‘gdIOCtx’ 没有名为 ‘data’ 的成员的相关文章

安装php-5.3.28 时问题

1:configure: error:xm12-config not ffound.please check your libxm12 installation [[email protected] /]# yum install libxml2-devel -y 安装完之后查找xml2-config文件是否存在 [[email protected] /] # find / -name "xml2-config" /usr/bin/xml2-config 如果存在的话重新安装php [

centos编译安装php5.6.20+nginx1.8.1+mysql5.6.17

LNMP 代表的就是:Linux系统下Nginx+MySQL+PHP这种网站服务器架构. 本次实践需求: 实践centos6.5编译安装 LNMP生产环境 架构 web生产环境 使用 xcache 优化php 作为 Web 服务器:相比 Apache,Nginx 使用更少的资源,支持更多的并发连接,体现更高的效率. 作为负载均衡服务器:Nginx既可以在内部直接支持Rails和PHP,也可以支持作为 HTTP代理服务器对外进行服务.Nginx用C编写,不论是系统资源开销还是CPU使用效率都比Pe

安装Stomp扩展时错误提示error: &#39;zend_class_entry&#39; has no member named &#39;default_properties&#39;

在安装stomp扩展时, 有这样的提示 error: 'zend_class_entry' has no member named 'default_properties' 交待下安装上下文, stomp 版本是 1.0.3 而最新的是 1.0.8  php 版本是5.4.x , 猜想可能是由于版本差异造成的, 因为1.0.3的 stomp 出现的年份是2010年... 于是网上搜索了一下, 文章点这 说在出错的文件中把 default_properties 改成 default_propert

安装Windows SDK时错误信息

安装Microsoft Windows SDK 7.1时出现的错误(附解决办法) (2012-07-10 191344) 错误回放一: A problem occurred while installing selected Windows SDK components. Installation of the "Microsoft Windows SDK for Windows 7 Compilers for x86" product has reported the followi

11.10/11.11/11.12 安装PHP5 11.13 安装PHP7

11.10/11.11/11.12 安装PHP5根据提示完成安装,安装过程中会报错,按实际报错的需要安装我这安装出现这个错误:configure: error: mcrypt.h not found. Please reinstall libmcrypt.解决办法是安装这2个包:首行安装:yum install -y epel-release再安装:yum install -y libmcrypt-devel 因为这个包是依赖上一个包的查看加载的模块查看apache的配置文件输入/php5.so

yum 安装时错误 Errno 14 Couldn&#39;t resolve host 解决办法

是由于DNS解析错误引起的 修改/etc/resolv.conf 添加一个nameserver 8.8.8.8完成 yum 安装时错误 Errno 14 Couldn't resolve host 解决办法

在widows 2008 x64bit R2下安装Oracle db 10.2.0.4时遇到的&quot;检查操作系统版本: 必须是5.1 or 5.2。实际为 6.1未通过&quot;

在Widows 2008 x64bit R2下安装Oracle db 10.2.0.4时遇到的"检查操作系统版本: 必须是5.1 or 5.2.实际为 6.1未通过" 特别说明:Widows 2008 x64bit R2下安装Oracle db 10.2.0.4仅仅是第一步,之后还得打10.2.0.5的patch.原因很简单:Oracle db 10.2.0.4 没有在 Widows 2008 x64bit R2通过认证. 解决方法: database\install\oraparam

yum 安装时错误 Couldn&#39;t resolve host 解决办法

修改/etc/resolv.conf 添加:nameserver 8.8.8.8 yum 安装时错误 Couldn't resolve host 解决办法

centos6.8下安装部署LNMP(备注:nginx1.8.0+php5.6.10+mysql5.6.12)

在平时运维工作中,经常需要用到LNMP应用框架.以下对LNMP环境部署记录下: 1)前期准备:为了安装顺利,建议先使用yum安装依赖库[[email protected] ~]#yum install -y make cmake gcc gcc-c++ autoconf automake libpng-devel libjpeg-devel zlib libxml2-devel ncurses-devel bison libtool-ltdl-devel libiconv libmcrypt m