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 ...
随机推荐
- python find命令、startwith命令
python的字符串有很多好用的操作,比如find,startswith命令. 这几个命令在处理配置文件的时候很有用,比如用startswith判断是否是注释行. 注意:几个函数的返回值是不同滴. 函 ...
- mac下cordova的ios-deploy安装问题
mac下进行cordova项目编译部署到ios设备,这个时候需要安装ios-deploy,会失败: npm WARN lifecycle ios-deploy@1.8.6~preinstall: ca ...
- spring mvc: 生成RSS源
spring mvc: 生成RSS源 准备: 从相同的maven存储库页面下载 Rome 库及其依赖项rome-utils,jdom和slf4j.和所需的依赖关系 <!-- rss源依赖 --& ...
- Java循环结构 - for, while 及 do...while
Java循环结构 - for, while 及 do...while 顺序结构的程序语句只能被执行一次.如果您想要同样的操作执行多次,,就需要使用循环结构. Java中有三种主要的循环结构: whil ...
- 搞懂分布式技术9:Nginx负载均衡原理与实践
搞懂分布式技术9:Nginx负载均衡原理与实践 本篇摘自<亿级流量网站架构核心技术>第二章 Nginx负载均衡与反向代理 部分内容. 当我们的应用单实例不能支撑用户请求时,此时就需要扩容, ...
- 虚拟机VirtualBox及轻量级的CentOS
1,先下载虚拟机VirtualBox和centos(下边有链接),将VirtualBox安装在本机 2,管理 --> 导入虚拟电脑 --> 选择本地centos文件 3,点击下一步 - ...
- 1.spring cloud eureka server配置
IDEA版本 2017.2.5 JDK 1.8 红色加粗内容为修改部分 1.创建一个新项目 2.选择eureka依赖 3.版本选择(重要)并且更新依赖 <?xml version="1 ...
- 002——vue小结
1.new 一个vue对象的时候你可以设置他的属性,其中最重要的包括三个,分别是:data,methods,watch. 2.其中data代表vue对象的数据,methods代表vue对象的方法,wa ...
- C++内存分配与对象构造的分离
在C++中,我们基本用new(delete)操作符分配(释放)内存.new操作符为特定类型分配内存,并在新分配的内存中构造该类型的一个对象.new表达式自动运行合适的构造函数来初始化每个动态分配的类类 ...
- L164
“TAKE ONLY memories, leave only footprints” is more than a hiking motto at the Sagarmatha National P ...