源码安装zabbix遇到的报错集锦

时间:2023-11-11 10:39:38

报错1:checking for mysql_config... configure: error: MySQL library not found

解决办法:查找mysql_config

    #find / -name "mysql_config*"

    /usr/local/mysql/bin/mysql_config

在配置时将原有的 --with-mysql 改为  --with-mysql=/usr/local/mysql/bin/mysql_config

常规报错及解决办法:

configure: error: Not found mysqlclient library      #yum -y install mysql-devel

configure: error: LIBXML2 library not found           #yum -y install libxml2-devel

configure: error: unixODBC library not found        # yum -y install unixODBC-devel

configure: error: Invalid Net-SNMP directory - unable to find net-snmp-config #yum -y install net-snmp-devel

configure: error: Invalid OPENIPMI directory - unable to find ipmiif.h #yum -y install OpenIPMI-devel

configure: error: Curl library not found            #yum -y install curl-devel

报错:checking for SSH2 support... no
configure: error: SSH2 library not found

解决:yum -y install libssh2-devel

报错:checking for LDAP support... no
configure: error: Invalid LDAP directory - unable to find ldap.h

解决:yum -y install openldap openldap-devel

报错:/usr/local/zabbix/missing: line 81: aclocal-1.14: command not found

进入对应的/usr/local/zabbix目录执行:

  autoreconf -vfi

如果PHP是7以上的版本,进入页面可能会出现报错:A non well formed numeric value encountered [zabbix.php:21 → require_once() → ZBase->run() → ZBase->

解决办法:找到对应的路径执行

sed -i '/$last = strtolower(substr($val, -1));/a$val = substr($val,0,-1);' /home/www/zabbix/include/func.inc.php  #注意路径