安装php-5.4.38时, 报错误:‘gdIOCtx’ 没有名为 ‘data’ 的成员
来源:互联网 发布:nba2013 14总决赛数据 编辑:程序博客网 时间:2024/05/02 00:07
我在安装php-5.4.38时,make时出现如下的错误:
In file included from /software/LAMP_Resource_Package/php-5.4.38/ext/gd/gd.c:103:
/software/LAMP_Resource_Package/php-5.4.38/ext/gd/gd_ctx.c: In function ‘_php_image_stream_putc’:/software/LAMP_Resource_Package/php-5.4.38/ext/gd/gd_ctx.c:51: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员
/software/LAMP_Resource_Package/php-5.4.38/ext/gd/gd_ctx.c: In function ‘_php_image_stream_putbuf’:
/software/LAMP_Resource_Package/php-5.4.38/ext/gd/gd_ctx.c:58: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员
/software/LAMP_Resource_Package/php-5.4.38/ext/gd/gd_ctx.c: In function ‘_php_image_stream_ctxfree’:
/software/LAMP_Resource_Package/php-5.4.38/ext/gd/gd_ctx.c:67: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员
/software/LAMP_Resource_Package/php-5.4.38/ext/gd/gd_ctx.c:68: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员
/software/LAMP_Resource_Package/php-5.4.38/ext/gd/gd_ctx.c:69: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员
/software/LAMP_Resource_Package/php-5.4.38/ext/gd/gd_ctx.c: In function ‘_php_image_output_ctx’:
/software/LAMP_Resource_Package/php-5.4.38/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
解决方法如下:
修改gd2的文件: /usr/local/gd2/include/include/gd_io.h
在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;
- 安装php-5.4.38时, 报错误:‘gdIOCtx’ 没有名为 ‘data’ 的成员
- php安装报错 ‘gdIOCtx’ 没有名为 ‘data’ 的成员
- 安装php5.4.10时, 错误:‘gdIOCtx’ 没有名为 ‘data’ 的成员
- _mysql.c:2638: 错误:‘_mysql_ConnectionObject’没有名为‘open’的成员
- class KDTree 没有名为 GeneratTree 的成员
- php5.4.26 安装出现 error: ‘struct gdIOCtx’ has no member named ‘data’
- unpv2中:struct ipc_perm没有名为seq的成员 的解决办法
- 记PHP安装报扩展无法加载的错误
- mysql 5.7目录下没有data目录导致报“服务没有报告任何错误”问题
- 虚拟机中安装红帽linux6老是报《没有找到可用磁盘》错误提示的解决办法
- 写友元函数时出现的错误---1IntelliSense: class "point" 没有成员 "operator<<"
- 安装php加速器Zend guard loader出现无法加载,没有找到php5.dll 的错误
- Redhat没有注册时yum安装的错误解决
- 配置Struts2时,报没有action与form表单填写的action对应的错误。
- xcode 的编译时提醒报错,但却没有提示错误的位置
- DataBinding:“System.Data.DataRowView”不包含名为“tea_DieClaID ”的属性。
- DataBinding:System.Data.DataRowView不包含名为“id”的属性
- nginx 错误日志 没有记录 PHP错误的原因
- 例题10-17 糖果 UVa1639
- 素质
- 项目实施过程中的风险控制
- Hibernate中Session的几个方法介绍
- MySql 学习系列之中文乱码解决方法总结
- 安装php-5.4.38时, 报错误:‘gdIOCtx’ 没有名为 ‘data’ 的成员
- iOS学习笔记(一)——ios搭建开发环境
- 【小常识】Appdata\Local Roaming LocalLow文件夹简介
- poj 1182 食物链 带权并查集
- Android Studio 初体验
- [转载]eclipse中svn的各种图标详解 问号
- 数组第二十四课,模拟ArrayList容器的底层实现,JDK源码分析
- C++ Primer 第八章 标准IO库
- 让你的网站支持手机二维码登录