使用libxml2支持编译Zabbix 5.2 [英] Compiling Zabbix 5.2 with libxml2 support

查看:82
本文介绍了使用libxml2支持编译Zabbix 5.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在编译以这种方式配置的Zabbix 5.2时遇到问题:

I have problem compiling Zabbix 5.2 configured this way:

# ./configure --enable-server --enable-agent   --with-net-snmp --with-libcurl --with-libxml2 --with-postgresql --with-prefix=/usr/local/zabbix5 --verbose
...
checking for PostgreSQL libraries... yes
checking if PostgreSQL version is >= 9.2... yes
checking for Zabbix server/proxy database selection... ok
checking for multirow insert statements... yes
checking for pkg-config... no
checking for pkg-config... no
configure: error: LIBXML2 library not found

现在,我已经安装了 libxml2-dev ( apt install libxml2-dev ).它确实显示为 libxml2-dev:amd64 ,不确定原因,因为操作系统是 amd64 .

Now I have installed libxml2-dev (apt install libxml2-dev). It does show up as libxml2-dev:amd64, not sure why, because the OS is amd64.

我尝试设置不同的环境变量,例如 export PKG_CONFIG_PATH =/usr/lib/x86_64-linux-gnu/pkgconfig/libxml-2.0.pc (由 libxml2-dev安装的配置:amd64 ).

I tried setting different environment variables, like export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/libxml-2.0.pc (that's configuration installed by libxml2-dev:amd64).

我不知道为什么会这样或如何解决.

I have no idea why this happens or how can I fix it.

操作系统:Debian 10 amd64.

OS: Debian 10 amd64.

推荐答案

我解决了这个问题,问题是我使用的源来自Debian软件包( apt source zabbix-server-pgsql )和它们不是从Zabbix网站下载的资源.

I resolved the issue, the problem is the sources I used come from Debian package (apt source zabbix-server-pgsql) and they're not sources downloaded from Zabbix site.

似乎在使用通常的构建时会发生此问题.制作;进行安装方式.但是,当我构建Debian软件包时,它可以正常运行:

It appears this problem happens when building in the usual ./configure; make; make install manner. However, when I build the Debian package it works OK:

dpkg-buildpackage -us -uc -nc

这篇关于使用libxml2支持编译Zabbix 5.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆