libxml2,已经安装了,在Asterisk里面执行./configure 时却提示找不到。

在Asterisk里面执行./configure 时错误提示如下:
checking for xml2-config… /usr/bin/xml2-config
configure: *** XML documentation will not be available because the ‘libxml2’ development package is missing.
configure: *** Please run the ‘configure’ script with the ‘–disable-xmldoc’ parameter option
configure: *** or install the ‘libxml2’ development package.

已经执行安装了apt-get install libxml2
apt-get install libxml2-dev

执行dpkg -s libxml2-dev 也显示已经安装了,
root@micro-os:/usr/src/asterisk-11.20.0# dpkg -s libxml2-dev
Package: libxml2-dev
Status: install ok installed
Priority: optional
Section: libdevel
Installed-Size: 3293
Maintainer: Kylin Developers <devel-discuss@kylinos.cn>
Architecture: arm64
Multi-Arch: same
Source: libxml2
Version: 2.9.4+dfsg1-6.1kord3
Depends: libicu-dev, libxml2 (>= 2.9.4+dfsg1-6.1kord3)
Suggests: pkg-config
Description: Development files for the GNOME XML library
XML is a metalanguage to let you design your own markup language.
A regular markup language defines a way to describe information in
a certain class of documents (eg HTML). XML lets you define your
own customized markup languages for many classes of document. It
can do this because it’s written in SGML, the international standard
metalanguage for markup languages.
.
Install this package if you wish to develop your own programs using
the GNOME XML library.
Homepage: http://xmlsoft.org
Original-Maintainer: Debian XML/SGML Group <debian-xml-sgml-pkgs@lists.alioth.debian.org>

怎么回事列?

一般来说不会有这样的问题,有可能是LZ误删了什么东西,或者是平台编包打包的时候出了问题。如果出现了的话可以先考虑重装一下这个dev包,依然不行可以考虑按照它的提示在configure时使用–disable-xmldoc选项。。。

执行一下绝对路径下的/usr/bin/xml2-config呗,看有没有这个东西,有的话可能版本不适合,看一下有没有config.log之类的文件,看看对xml2有没有版本要求,checking为什么会失败,实在不行先把config.cache 之类的删掉,再./configure --disable-xmldoc

楼上正解,通过查看config.log,缺少liblzma.so,只有liblzma.so5的库,通过复制liblzma.so.5,重命令为liblzma.so解决。