When I installed ZABBIX with source code, there was an error in the compilation phase:
checking for main in -lmysqlclient... no
configure: error: Not found mysqlclient library
system ubuntu18.04
mysql version 5.7.28
Here are my ZABBIX compilation settings:
./configure \
--prefix=/home/ttg/application/zabbix-4.4 \
--enable-server \
--enable-proxy \
--enable-agent \
--enable-java \
--enable-ipv6 \
--with-mysql=/usr/bin/mysql_config \
--with-net-snmp \
--with-openipmi \
--with-zlib \
--with-libpthread \
--with-libevent \
--with-ldap \
--with-libpcre \
--with-iconv \
--with-libxml2 \
--with-libcurl \
--with-libiksemel \
--with-libssh2 \
--with-mbedtls \
--with-jabber \
--with-unixodbc \
--with-ping
According to the solution on the network, I tested many times, but still showed the same error, such as the following method:
sudo apt-get install -y mysql-devel
perhaps
sudo apt-get install -y libmysqlclient-dev
None of these methods can solve this problem. Please help me. Thank you very much
Install
libssl-dev
package:When Zabbix configure script checks if MySQL libraries are available it runs
mysql_config
which insists on using-lssl
along with-lmysqlclient
. So the configure test fails with this misleading error message.I had the same problem too, but on Centos, I have installed openssl-devel and that fixed the issue. The message is indeed misleading