centos7 安装php 5.x.x 报错
错误1:
/usr/src/php-5.2.9/ext/dom/node.c:In function 'dom_canonicalization':
/usr/src/php-5.2.9/ext/dom/node.c:1950:21: error: dereferencingpointer to incomplete type
ret = buf->buffer->use;
^
Infile included from /usr/src/php-5.2.9/main/php.h:38:0,
from/usr/src/php-5.2.9/ext/dom/node.c:26:
/usr/src/php-5.2.9/ext/dom/node.c:1952:40: error:dereferencing pointer to incomplete type
RETVAL_STRINGL((char *)buf->buffer->content, ret, 1);
^
/usr/src/php-5.2.9/Zend/zend_API.h:472:14:note: in definition of macro 'ZVAL_STRINGL'
char *__s=(s); int __l=l; \
^
/usr/src/php-5.2.9/ext/dom/node.c:1952:5:note: in expansion of macro 'RETVAL_STRINGL'
RETVAL_STRINGL((char *)buf->buffer->content, ret, 1);
make:*** [ext/dom/node.lo] 错误1
[root@localhostphp-5.2.9]#
错误2:
/usr/src/php-5.2.9/ext/dom/documenttype.c:In function 'dom_documenttype_internal_subset_read':
/usr/src/php-5.2.9/ext/dom/documenttype.c:219:42: error:dereferencing pointer to incomplete type
strintsubset =xmlStrndup(buff->buffer->content, buff->buffer->use);
^
/usr/src/php-5.2.9/ext/dom/documenttype.c:219:65: error:dereferencing pointer to incomplete type
strintsubset =xmlStrndup(buff->buffer->content, buff->buffer->use);
^
make:*** [ext/dom/documenttype.lo] 错误 1
[root@localhostphp-5.2.9]#
解决办法:
下载https://mail.gnome.org/archives/xml/2012-August/txtbgxGXAvz4N.txt补丁程序
编辑/usr/src/php-5.2.9/ext/dom/node.c文件,将源代码段替换为对应的补丁代码段(表紫色部分)
---ext/dom/node.c 2012-08-06 17:49:48.826716692+0800
+++ext/dom/node.c 2012-08-0617:52:47.633484660 +0800
@@-1895,9 +1895,17 @@ static void dom_canonicalization(INTERNA
RETVAL_FALSE;
} else {
if (mode == 0) {
#ifdef LIBXML2_NEW_BUFFER
ret =xmlOutputBufferGetSize(buf);
#else
ret = buf->buffer->use;
#endif
if (ret > 0) {
#ifdef LIBXML2_NEW_BUFFER
RETVAL_STRINGL((char *) xmlOutputBufferGetContent(buf), ret, 1);
+#else
RETVAL_STRINGL((char *) buf->buffer->content,ret, 1);
#endif
} else {
RETVAL_EMPTY_STRING();
}
3.同理编辑/usr/src/php-5.2.9/ext/dom/documenttype.c文件,将源代码段替换为对应的补丁代码段(表紫色部分)
---ext/dom/documenttype.c 2012-08-0618:02:16.019640870 +0800
+++ext/dom/documenttype.c 2012-08-06 18:06:16.612228905+0800
@@-205,7 +205,13 @@ int dom_documenttype_internal_subset_rea
if (buff != NULL) {
xmlNodeDumpOutput (buff, NULL, (xmlNodePtr)intsubset, 0, 0, NULL);
xmlOutputBufferFlush(buff);
#ifdef LIBXML2_NEW_BUFFER
ZVAL_STRINGL(*retval,xmlOutputBufferGetContent(buff),
xmlOutputBufferGetSize(buff), 1);
#else
ZVAL_STRINGL(*retval, buff->buffer->content,buff->buffer->use, 1);
#endif
(void)xmlOutputBufferClose(buff);
return SUCCESS;
}
centos7 安装php 5.x.x 报错的更多相关文章
- CentOS7安装Docker时的异常报错与解决方法
重要:有些人在vmware中安装了新的centos用于使用docker,但是往往会忽略了更换源与进行系统update, 这样会导致安装过程中出现诸多如下类问题,为了避免不必要的麻烦在安装docker前 ...
- Centos7安装RabbitMQ解决Erlang依赖报错
通过yum等软件仓库都可以直接安装RabbitMQ,但版本一般都较为保守. RabbitMQ官网提供了新版的rpm包(http://www.rabbitmq.com/download.html),但是 ...
- 使用yum安装应用程序时候,报错:[Errno 14] PYCURL ERROR 7 - "Failed to connect to 2001:da8:8000:6023::230: 网络不可达"
使用yum安装应用程序时候,报错:[Errno 14] PYCURL ERROR 7 - "Failed to connect to 2001:da8:8000:6023::230: 网络不 ...
- linux上安装完torch后仍报错:ImportError: No module named torch
linux上安装完torch后仍报错: Traceback (most recent call last): File , in <module> import torch ImportE ...
- Mac安装HomeBridge适配小米Homekit报错:module未找到解决
Mac安装HomeBridge适配小米Homekit报错:module未找到 具体错误是: module.js:471 throw err; balabalal...... 问了一圈,终于解决,但是又 ...
- 在CentOS上安装node.js的时候报错:No acceptable C compiler found!解决办法
在CentOS上安装node.js的时候报错:No acceptable C compiler found! 原因:没有c编译器. 解决办法:安装GCC 命令如下: #yum install gcc ...
- Xamarin开发安装Visual Studio 2015 update2报错的解决办法
Xamarin开发安装Visual Studio 2015 update2报错的解决办法错误信息:update 2 requires a member of the visual studio 201 ...
- Windows 10 上安装 3D Studio Max 2016 报错的解决办法
在 Windows 10 上安装 3D Stuido Max 2016 报错,无法正常安装,查看日志是 VC 运行时安装错误,经过分析发现在 Windows 10 上已经有这些运行时并且版本比安装包中 ...
- 安装 r 里的 igraph 报错
转载来源:http://genek.tv/article/40 1186 0 0 安装 r 里的 igraph 报错: foreign-graphml.c: In function ‘igraph_w ...
随机推荐
- TeeChart.Direct2D.dll的使用
这个dll本身依赖于第三方的控件,SlimDX ,可以从 http://slimdx.org/ 下载. .net4.0的版本区分x86和x64 帧数的概念 我们通常说帧数,简单地说,就是在1秒钟时间 ...
- NOIP2014 T4 子矩阵 dfs+dp
最近在狂补题啊QAQ... 打算先把NOIP的干掉吧... 点我看题 链接还是放洛谷的了... 题意:给一个n*m的矩阵,在这个矩阵里选 r 行 c 列,然后这 r 行 c 列所相交的格子为新矩阵的, ...
- 爬虫框架Scrapy之Spider
Spider Spider类定义了如何爬取某个(或某些)网站.包括了爬取的动作(例如:是否跟进链接)以及如何从网页的内容中提取结构化数据(爬取item). 换句话说,Spider就是您定义爬取的动作及 ...
- maven(一)maven自带的插件
关于org.apache.maven.plugins 前言 maven提供了很多插件给我们使用,解释3个java环境常用的maven插件, maven-jar-plugin, maven-compli ...
- Ice Cream Tower
2017-08-18 21:53:38 writer:pprp 题意如下: Problem D. Ice Cream Tower Input file: Standard Input Output f ...
- centos添加php及mysql环境变量
在Linux CentOS系统上安装完php和MySQL后,为了使用方便,需要将php和mysql命令加到系统命令中,如果在没有添加到环境变量之前,执行 “php -v”命令查看当前php版本信息时时 ...
- LNMP 如何安装mongodb ----lnmp一键安装包之后
mongodb 直接下载官方最新包解压就可以使用了. wget -c http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.6.4.tgz ta ...
- js中的内部属性与delete操作符
本文正式地址:http://www.xiabingbao.com/javascript/2015/08/03/javascript-delete-configurable 在讲解Configurabl ...
- ADC第一次读取
在ADCCON中,最后0位和1位互斥.如果1位选1的话,0位的值无效.如果1位选0的话,0位的值才有效.当1位选1的话:这是应用层的程序 #if ADSTART==0void niuniu(void) ...
- 关于.net4.0中的Action委托
在使用委托时,若封装的方法无返回值,并且参数在0-7个,可考虑使用.Net4.0中的Action委托,建议使用系统自带的,减少自定义 public delegate void Action<in ...