skip to Main Content

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.

2

Answers


  1. Chosen as BEST ANSWER

    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
    

  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search