0

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

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.

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.

OS: Debian 10 amd64.

1

2 Answers 2

5

I just successfully installed Zabbix 5.2 from sources on Ubuntu 16.04. I also got the same error as yours even though I installed the libxml2-dev package. After a day of searching for solutions, I came up with an idea when looking at the error log:

checking for pkg-config... no
configure: error: LIBXML2 library not found

Probably because I have not installed the pkg-config package. Then I tried to install it and run the configuration command again:

sudo apt install pkg-config

./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-libcurl --with-libxml2=/usr/bin/xml2-config

Surprisingly, the configuration was successful.

1
  • Thank you, but I've had pkg-config installed before it, in fact I was using it to try getting libxml2 configuration (unsuccessfully). Dec 4, 2020 at 17:34
0

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.