错误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. LeetCode——Largest Rectangle in Histogram

    Question Given n non-negative integers representing the histogram's bar height where the width of ea ...

  2. 解题报告:hdu2602 Bone collector 01背包模板

    2017-09-03 15:42:20 writer:pprp 01背包裸题,直接用一维阵列的做法就可以了 /* @theme: 01 背包问题 - 一维阵列 hdu 2602 @writer:ppr ...

  3. 创建Jmeter中使用的jar包中的工具类方法

    1. 在IDEA中新建一个maven工程. 2. 编写工具类方法,如加密算法.此处以加法为例. package DemoTest; public class DemoClass{ public int ...

  4. LR--实现HTTP协议的接口测试

    场景分析:使用LR完成HTTP协议的接口测试 流程: 1.首先需要找一个接口(POST.GET接口) 2.LR中点击Insert-->New Step-->web_custom_reque ...

  5. go Rails 知识点,Concepts Series:url和parameter; 建立Rails App Templates;报错页面debug; counter_cache

    Rails Concepts Series: https://gorails.com/series/rails-concepts 基本都是免费的 一些细小的知识点,很有帮助. URL和paramete ...

  6. (3) iOS开发之UI处理-UIView篇

    在UIView作为许多子控件的容器的时候,首先我们需要动态的计算出UIView下的所有子控件的高度,并布局排列好,然后我们还要把作为容器的UIView的高度调整到刚好包裹着所有子控件,不会过矮,也不会 ...

  7. guava学习--cache

    转载:http://outofmemory.cn/java/guava/cache/how-to-use-guava-cache   http://www.cnblogs.com/parryyang/ ...

  8. laravel怎么获取到public路径

    app_path() app_path函数返回app目录的绝对路径: $path = app_path(); 你还可以使用app_path函数为相对于app目录的给定文件生成绝对路径: $path = ...

  9. RMAN中format的参数

    (转自:http://blog.chinaunix.net/uid-23079711-id-2554290.html) format 的替换变量,注意大小写! 1.     %d --数据库的db_n ...

  10. Java复习11. 单例编程

    Java复习11. 单例编程 1.最简单的写法,那个方式是线程不安全的 public class Singleton {     private static Singleton instance; ...