在安装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;

转 安装php时报gd相关的错误(gd_ctx.c)的更多相关文章

  1. 安装 gcc-c++ 时报错和原有 gcc 版本冲突

    Centos 6.7 安装 gcc-c++时报下面的错误: Resolving Dependencies --> Running transaction check ---> :-.el6 ...

  2. ubuntu:通过封装验证码类库一步步安装php的gd扩展

    我相信很多人的lamp环境都是直接复制一堆参数安装进去的,这里有可能成功,也有可能失败,如果是新手,估计要碰到各种错误,就算安装成功,也未必知道那些参数是干嘛的,反正装进去能用就行. 我当初开始的时候 ...

  3. 1.Maven+SpringMVC+Eclipse软件安装配置,Maven报插件错误,Eclipse总是卡死的解决办法,导入一个maven工程后 一直显示importing maven project

     使用Maven+SpringMVC+Eclipse软件安装配置过程中的问题: 1.Eclipse总是卡死的解决办法: 一:内存不足所以会卡死,配置一下eclipse.ini修改这几个值就好了-X ...

  4. 【安装Python环境】之安装Selenium2时报UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc8 in position 12: invalid continuation byte问题

    问题描述: windows8.1系统,Python3环境安装Selenium2时报错,错误如下: ..... ..... File "F:\软件\python3.6.1\lib\site-p ...

  5. Python安装setuptools时报Compression requires the (missing) zlib

    装机员为您提供Python安装setuptools时报Compression requires the (missing) zlib的文章咨询供您阅读,如何使用Python安装setuptools时报 ...

  6. Linux下安装PHP的GD支持库

    Linux下安装PHP的GD支持库   1.安装 zlib  wget ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/zlib-1.2.3.tar.gz ...

  7. 关于Linux下安装Oracle时报错:out of memory的问题分析说明

    一.说明 在Oracle安装过程中,可能遇到out of memory这种错误,这是由于系统内存不足导致!我们可以通过加内存的方式解决! 而如果是另一种情况呢: 例如我在主机上装了两个Oracle服务 ...

  8. 安装mysql会出现start service错误

    安装MySQL时无法启动服务(could not start the service MYSQL .Error:0)安装mysql会出现start service错误安装mysql时 配置到start ...

  9. 在安装pdfplumber时报错 Microsoft Visual C++ 14.0 is required.

    在安装pdfplumber时报下列错误: 解决方法:     更新pip ,因为pip 版本太旧 来自为知笔记(Wiz)

随机推荐

  1. 通过pycharm使用git

    前言 使用git+pycharm有一段时间了,算是稍有点心得,这边整理一下,可能有的方法不是最优,欢迎交流,可能还是习惯敲命令去使用git,不过其实pycharm已经帮忙做了很多了,我们可以不用记住那 ...

  2. 如何大幅优化solr的查询性能(转)

    提升软件性能,通常喜欢去调整各种启动参数,这没有多大意义,小伎俩. 性能优化要从架构和策略入手,才有可能得到较大的收益 Solr的查询是基于Field的,以Field为基本单元,例如一个文章站要索引 ...

  3. window.open 浏览器差异.

    首先引入 w3help的,莫的测试: 原帖地址:http://www.w3help.org/zh-cn/causes/BX1053   w3help的测试,和我的测试相互补充,应该比较完整了.悲剧的是 ...

  4. [leetcode]Permutations II @ Python

    原题地址:https://oj.leetcode.com/problems/permutations-ii/ 题意: Given a collection of numbers that might ...

  5. 为Linux操作系统所在的logical volumn扩容

    感谢Lieven和Tom的协助,这个问题才得以解决.我在这里把解决问题的步骤总结一下,帮助自己学习. 问题描述 =========== 笔者有一台linux的物理机,其上名为centos-root的l ...

  6. Generate Parentheses leetcode java

    题目: Given n pairs of parentheses, write a function to generate all combinations of well-formed paren ...

  7. spring boot整合mybatis+mybatis-plus

    Spring boot对于我来说是一个刚接触的新东西,学习过程中,发现这东西还是很容易上手的,Spring boot没配置时会默认使用Spring data jpa,这东西可以说一个极简洁的工具,可是 ...

  8. DIV+CSS规范命名集合

    我们开发CSS+DIV网页(Xhtml)时候,比较困惑和纠结的事就是CSS命名,特别是新手不知道什么地方该如何命名,怎样命名才是好的方法. 命名规则说明: 1).所有的命名最好都小写 2).属性的值一 ...

  9. spark0.9分布式安装

    http://blog.csdn.net/myboyliu2007/article/details/18990277 spark安装包:spark-0.9.0-incubating-bin-hadoo ...

  10. 安装loadrunner

    Loadrunner安装具体解释 一 .下载篇. 我的下载地址是:http://pan.baidu.com/s/1c0IqAOC 程序4G多.非常大. 二.           安装篇 1.执行&qu ...