Ubuntu编译zabbix报错
Ubuntu编译zabbix报错
#报错1:
[root@zabbix1 /usr/local/src/zabbix-4.0.15]#./configure --prefix=/apps/zabbix_server --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl --with-libxml2 --enable-java
configure: error: MySQL library not found
centos缺包mysql-devel
解决方法:
sudo apt-get install libmysqlclient-dev
sudo updatedb
locate mysql_config
#接着报2:
configure: error: LIBXML2 library not found
解决方法缺包:
[root@zabbix1 /usr/local/src/zabbix-4.0.15]#apt -y install libxml2-dev
#报错:3:
configure: error: Invalid Net-SNMP directory - unable to find net-snmp-config
解决方法:
#apt-get install libsnmp-dev snmp
#报错4:
configure: error: Unable to use libevent (libevent check failed)
解决方法:
centos缺包libevent-devel
apt-get -y install libevent-dev
#报错5:
configure: error: Unable to find "javac" executable in path
解决方法:
缺少javac这个命令行编译工具
apt-get -y install openjdk-8-jdk
#报错6:
configure: error: Curl library not found
解决方法:
缺少curl工具相关的依赖库
apt-get -y install libcurl4-openssl-dev
报错7
ERROR 1709 (HY000) at line 89: Index column size too large. The maximum column size is 767 bytes.
解决方法:
说明索引列大小太大。最大列大小为767字节。
# egrep -v "^#|^$" /etc/mysql/my.cnf
[mysqld]
innodb_file_format=BARRACUDA
innodb_large_prefix=true
innodb_default_row_format=DYNAMIC
character-set-server=utf8mb4
collation-server=utf8mb4_unicode_ci
[client-server]
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mariadb.conf.d/
# systemctl restart mariadb
报错8:
configure: error: no acceptable C compiler found in $PATH
解决方法:
缺少c编译器,安装C语言环境即可
# apt-get -y install gcc
报错9:
configure: error: Unable to use libpcre (libpcre check failed)
解决方法;
缺少支持正则表达式的相关库,安装其依赖包即可。
# apt-get -y install libpcre3 libpcre3-dev