编译PHP 报错:node.c: In function dom_canonicalization  /opt/php-5.2.17/ext/dom/node.c:1953: error: dereferencing pointer to incomplete type

是libxml导致的问题,可以下载补丁patch一下。

# curl -o php-5.x.x.patch https://mail.gnome.org/archives/xml/2012-August/txtbgxGXAvz4N.txt
# cd php-5.x.x
# patch -p0 -b < ./php-5.x.x.patch
patching file ext/dom/node.c
patching file
ext/dom/documenttype.c
patching file ext/simplexml/simplexml.c
再次编译即可。

如果下载不下来,可以点击下面的链接下载

https://pan.baidu.com/s/1eSnyeWi

或者:

配置时去掉--with-libxml-dir 这个选项。但没有但没有DOM和XML。

如果需要DOM和XML。则配置--with-libxml-dir=libxml2安装目录/include/libxml2/libxml

相关文章:

  • 2021-10-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-20
  • 2021-06-30
  • 2022-12-23
猜你喜欢
  • 2021-11-08
  • 2022-12-23
  • 2022-12-23
  • 2021-04-25
  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案