LAMP php5.4编译
2015-09-04 17:16
666 查看
编译时出现下列问题时:
In file included from /usr/local/src/php-5.4.6/ext/gd/gd.c:103:
/usr/local/src/php-5.4.6/ext/gd/gd_ctx.c: 在函数‘_php_image_stream_putc’中:
/usr/local/src/php-5.4.6/ext/gd/gd_ctx.c:51: 错误:‘struct gdIOCtx’没有名为‘data’的成员
/usr/local/src/php-5.4.6/ext/gd/gd_ctx.c: 在函数‘_php_image_stream_putbuf’中:
/usr/local/src/php-5.4.6/ext/gd/gd_ctx.c:58: 错误:‘struct gdIOCtx’没有名为‘data’的成员
/usr/local/src/php-5.4.6/ext/gd/gd_ctx.c: 在函数‘_php_image_stream_ctxfree’中:
/usr/local/src/php-5.4.6/ext/gd/gd_ctx.c:67: 错误:‘struct gdIOCtx’没有名为‘data’的成员
/usr/local/src/php-5.4.6/ext/gd/gd_ctx.c:68: 错误:‘struct gdIOCtx’没有名为‘data’的成员
/usr/local/src/php-5.4.6/ext/gd/gd_ctx.c:69: 错误:‘struct gdIOCtx’没有名为‘data’的成员
In file included from /usr/local/src/php-5.4.6/ext/gd/gd.c:103:
/usr/local/src/php-5.4.6/ext/gd/gd_ctx.c: 在函数‘_php_image_output_ctx’中:
/usr/local/src/php-5.4.6/ext/gd/gd_ctx.c:153: 错误:‘gdIOCtx’没有名为‘data’的成员
make: *** [ext/gd/gd.lo] 错误 1
修改gd安装目录下的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);
int (*seek) (struct gdIOCtx *, const int);
long (*tell) (struct gdIOCtx *);
void (*gd_free) (struct gdIOCtx *);
void (*data);
}
gdIOCtx;
其中红色的部分为添加的修改,其他部分无修改。
二、当出现以下错误时:(不知道怎改)
Generating phar.php
Generating phar.phar
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
directorytreeiterator.inc
pharcommand.inc
clicommand.inc
invertedregexiterator.inc
directorygraphiterator.inc
phar.inc
Build complete.
Don't forget to run 'make test'.
使用以下命令
wget http://pear.php.net/go-pear.phar /usr/local/php/bin/php go-pear.phar
默认参数。
In file included from /usr/local/src/php-5.4.6/ext/gd/gd.c:103:
/usr/local/src/php-5.4.6/ext/gd/gd_ctx.c: 在函数‘_php_image_stream_putc’中:
/usr/local/src/php-5.4.6/ext/gd/gd_ctx.c:51: 错误:‘struct gdIOCtx’没有名为‘data’的成员
/usr/local/src/php-5.4.6/ext/gd/gd_ctx.c: 在函数‘_php_image_stream_putbuf’中:
/usr/local/src/php-5.4.6/ext/gd/gd_ctx.c:58: 错误:‘struct gdIOCtx’没有名为‘data’的成员
/usr/local/src/php-5.4.6/ext/gd/gd_ctx.c: 在函数‘_php_image_stream_ctxfree’中:
/usr/local/src/php-5.4.6/ext/gd/gd_ctx.c:67: 错误:‘struct gdIOCtx’没有名为‘data’的成员
/usr/local/src/php-5.4.6/ext/gd/gd_ctx.c:68: 错误:‘struct gdIOCtx’没有名为‘data’的成员
/usr/local/src/php-5.4.6/ext/gd/gd_ctx.c:69: 错误:‘struct gdIOCtx’没有名为‘data’的成员
In file included from /usr/local/src/php-5.4.6/ext/gd/gd.c:103:
/usr/local/src/php-5.4.6/ext/gd/gd_ctx.c: 在函数‘_php_image_output_ctx’中:
/usr/local/src/php-5.4.6/ext/gd/gd_ctx.c:153: 错误:‘gdIOCtx’没有名为‘data’的成员
make: *** [ext/gd/gd.lo] 错误 1
修改gd安装目录下的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);
int (*seek) (struct gdIOCtx *, const int);
long (*tell) (struct gdIOCtx *);
void (*gd_free) (struct gdIOCtx *);
void (*data);
}
gdIOCtx;
其中红色的部分为添加的修改,其他部分无修改。
二、当出现以下错误时:(不知道怎改)
Generating phar.php
Generating phar.phar
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
directorytreeiterator.inc
pharcommand.inc
clicommand.inc
invertedregexiterator.inc
directorygraphiterator.inc
phar.inc
Build complete.
Don't forget to run 'make test'.
使用以下命令
wget http://pear.php.net/go-pear.phar /usr/local/php/bin/php go-pear.phar
默认参数。
相关文章推荐
- php通过判断来源主机头进行防盗链
- php模拟数据库常用操作效果
- php变量-单引号不编译,双引号编译
- An Isolated DAC Using PWM Output
- php实例-set和get方法
- 阿里云 使用SFTP方式传输文件
- php这是一个随机打印输出字符串的例子
- php实现ocr文字识别
- PHP循环遍历倒金字塔
- PHP字符串中的变量解析(+教你如何在PHP字符串中加入变量)
- navicat导出到phpmyadmin 注意事项
- php预定义$_SERVER实例,所有$_SERVER开头的都是预定义服务变量。
- TP 页面跳转success 和 error
- php 上传文件 $_FILES['']['type']的值
- php 上传文件 $_FILES['']['type']的值
- C#写的客户端连接 php的服务器端的小例子
- C#写的客户端连接 php的服务器端的小例子
- PHP中的反射
- ThinkPHP 中 获取最后一次执行sql语句 和变量调试
- php设计模式专题附源码(适配器模式、模板模式、命令模式、单例模式、观察者模式)