错误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 报错的更多相关文章

  1. CentOS7安装Docker时的异常报错与解决方法

    重要:有些人在vmware中安装了新的centos用于使用docker,但是往往会忽略了更换源与进行系统update, 这样会导致安装过程中出现诸多如下类问题,为了避免不必要的麻烦在安装docker前 ...

  2. Centos7安装RabbitMQ解决Erlang依赖报错

    通过yum等软件仓库都可以直接安装RabbitMQ,但版本一般都较为保守. RabbitMQ官网提供了新版的rpm包(http://www.rabbitmq.com/download.html),但是 ...

  3. 使用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: 网络不 ...

  4. linux上安装完torch后仍报错:ImportError: No module named torch

    linux上安装完torch后仍报错: Traceback (most recent call last): File , in <module> import torch ImportE ...

  5. Mac安装HomeBridge适配小米Homekit报错:module未找到解决

    Mac安装HomeBridge适配小米Homekit报错:module未找到 具体错误是: module.js:471 throw err; balabalal...... 问了一圈,终于解决,但是又 ...

  6. 在CentOS上安装node.js的时候报错:No acceptable C compiler found!解决办法

    在CentOS上安装node.js的时候报错:No acceptable C compiler found! 原因:没有c编译器. 解决办法:安装GCC 命令如下: #yum install gcc ...

  7. Xamarin开发安装Visual Studio 2015 update2报错的解决办法

    Xamarin开发安装Visual Studio 2015 update2报错的解决办法错误信息:update 2 requires a member of the visual studio 201 ...

  8. Windows 10 上安装 3D Studio Max 2016 报错的解决办法

    在 Windows 10 上安装 3D Stuido Max 2016 报错,无法正常安装,查看日志是 VC 运行时安装错误,经过分析发现在 Windows 10 上已经有这些运行时并且版本比安装包中 ...

  9. 安装 r 里的 igraph 报错

    转载来源:http://genek.tv/article/40 1186 0 0 安装 r 里的 igraph 报错: foreign-graphml.c: In function ‘igraph_w ...

随机推荐

  1. G - 锘爷考驾照

    2017-07-17 11:56:06 writer:pprp 题目描述 大家都知道,锘爷是XDUdp第一人,所以锘爷决定要去考驾照!(这很有逻辑吧),他为了一次考到驾照,于是买了一辆越野车从学校开回 ...

  2. Python学习札记(十) Function1 函数调用

    参考:调用函数 Note 1.Python内置了很多函数,我们可以直接对这些函数进行调用.Python官网:Built in Fuctions eg.调用abs函数(取绝对值函数): >> ...

  3. 如何更改nagios监控默认的检查时间

    /usr/local/nagios/etc/nagios.cfg: interval_length 表示时间单位,默认为60,即1分钟 /usr/local/nagios/etc/objects/se ...

  4. 使用jsonp去访问跨域数据,回调使用数据

    var foo = function (data) { console.log("foo", data)} var testJsonP = function () { $.ajax ...

  5. Learning Perl 第九章习题第二题

    把输入文件中的所有Fred换成Larry, 不区分大小写. 知识点 1. 文本文件读写 2. 简单的正则替换 3. unless 的用法 4. $_ 的用法

  6. cocos2d-x入门二 helloworld实例运行与创建

    本机环境:win7+VS2012+python2.7.8+cocos2d-x-3.8,另外本机已经配置android开发环境(java+eclipse+SDK+ADT),针对环境搭建后续会有一篇详细说 ...

  7. jQuery全局冲突案例,解决$.noConflict()

    如图:犹豫$在js中可以作为一个变量去定义,所以在引入jQuery包之前定义了$对象,那么,在引入jQuery包之后就不能使用$对象了 解决:使用$.noConflict()她可以返回一个对象,这个对 ...

  8. Iterator 和 for...of 循环

    Iterator(遍历器)的概念 § ⇧ JavaScript 原有的表示“集合”的数据结构,主要是数组(Array)和对象(Object),ES6 又添加了Map和Set.这样就有了四种数据集合,用 ...

  9. 理解OAuth 2.0授权

    一.什么是OAuth 二.什么场景下会用到OAuth授权 三.OAuth 2.0中的4个成员 四.OAuth 2.0授权流程 五.OAuth 2.0授权模式 1.    authorization c ...

  10. 迷宫实现递归版本C++

    迷宫实现递归版本C++ 问题描述: //////////////////////////////////////////////////////////////题目:迷宫求解问题. 大致思路: //1 ...