ITPub博客

首页 > 应用开发 > IT综合 > 安装zabbix使出错

安装zabbix使出错

IT综合 作者:urgel_babay 时间:2016-05-11 17:13:58 0 删除 编辑
安装zabbix使出错



1、
checking for mysql_config... /usr/bin/mysql_config
checking for main in -lmysqlclient ... no
configure: error: Not found mysqlclient library
解决:
确认安装了mysql mysql-devel mysql-server 包
查找系统内有没有 libmysqlclient.so 
有的yum安装的mysql没有这个文件,需要自行链接一下


cd /usr/lib/mysql/
[root@test mysql]# ln -s libmysqlclient.so.15.0.0 libmysqlclient.so
[root@test mysql]# ln -s libmysqlclient_r.so.15.0.0 libmysqlclient_r.so
网上有些资料说的是64位的,注意识别






2、
In file included from ../../../include/db.h:25,
                 from db.c:22:
../../../include/zbxdb.h:67:20: error: mysql.h: No such file or directory
../../../include/zbxdb.h:68:21: error: errmsg.h: No such file or directory
../../../include/zbxdb.h:69:27: error: mysqld_error.h: No such file or directory
In file included from ../../../include/db.h:25,
                 from db.c:22:
../../../include/zbxdb.h:71: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
../../../include/zbxdb.h:174: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
../../../include/zbxdb.h:175: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
../../../include/zbxdb.h:177: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘zbx_db_fetch’
In file included from db.c:22:
../../../include/db.h:546: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
../../../include/db.h:548: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
../../../include/db.h:549: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘DBfetch’
../../../include/db.h:586: error: expected declaration specifiers or ‘...’ before ‘MYSQL_ROW’
db.c:34: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
db.c: In function ‘zbx_db_connect’:
db.c:119: error: ‘conn’ undeclared (first use in this function)
db.c:119: error: (Each undeclared identifier is reported only once
db.c:119: error: for each function it appears in.)
db.c:121: error: ‘CLIENT_MULTI_STATEMENTS’ undeclared (first use in this function)
db.c:145: error: ‘CR_CONN_HOST_ERROR’ undeclared (first use in this function)
db.c:146: error: ‘CR_SERVER_GONE_ERROR’ undeclared (first use in this function)
db.c:147: error: ‘CR_CONNECTION_ERROR’ undeclared (first use in this function)
db.c:148: error: ‘CR_SERVER_LOST’ undeclared (first use in this function)
db.c:149: error: ‘ER_SERVER_SHUTDOWN’ undeclared (first use in this function)
db.c:150: error: ‘ER_ACCESS_DENIED_ERROR’ undeclared (first use in this function)
db.c:151: error: ‘ER_ILLEGAL_GRANT_FOR_TABLE’ undeclared (first use in this function)
db.c:152: error: ‘ER_TABLEACCESS_DENIED_ERROR’ undeclared (first use in this function)
db.c:153: error: ‘ER_UNKNOWN_ERROR’ undeclared (first use in this function)
db.c: In function ‘zbx_db_close’:
db.c:350: error: ‘conn’ undeclared (first use in this function)
db.c: At top level:
db.c:409: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
db.c: In function ‘zbx_db_vexecute’:
db.c:656: error: ‘conn’ undeclared (first use in this function)
db.c:668: error: ‘CR_CONN_HOST_ERROR’ undeclared (first use in this function)
db.c:669: error: ‘CR_SERVER_GONE_ERROR’ undeclared (first use in this function)
db.c:670: error: ‘CR_CONNECTION_ERROR’ undeclared (first use in this function)
db.c:671: error: ‘CR_SERVER_LOST’ undeclared (first use in this function)
db.c:672: error: ‘ER_SERVER_SHUTDOWN’ undeclared (first use in this function)
db.c:673: error: ‘ER_ACCESS_DENIED_ERROR’ undeclared (first use in this function)
db.c:674: error: ‘ER_ILLEGAL_GRANT_FOR_TABLE’ undeclared (first use in this function)
db.c:675: error: ‘ER_TABLEACCESS_DENIED_ERROR’ undeclared (first use in this function)
db.c:676: error: ‘ER_UNKNOWN_ERROR’ undeclared (first use in this function)
db.c: At top level:
db.c:825: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
db.c:1124: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
db.c:1139: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘zbx_db_fetch’
make[3]: *** [db.o] Error 1
make[3]: Leaving directory `/tmp/zabbix-1.8.4/src/libs/zbxdb'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/zabbix-1.8.4/src/libs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/zabbix-1.8.4/src'
make: *** [all-recursive] Error 1


解决:
zabbix编译时找不到mysql.h文件
需要安装 mysql-devel 包 yum install mysql-devel


2、
configure: error: SQLite3 library not found
解决:
自己编译一个sqlite3再指定
--with-sqlite3=/usr/local/app/tools/sqlite3


3、
../../../include/sysinc.h:383:24: error: curl/curl.h: No such file or directory
make[3]: *** [md5.o] Error 1
解决:
加环境变量
base_dir=/usr/local/app/tools
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/app/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/local/app/libxml2/bin:/usr/local/app/ruby/bin:/usr/kerberos/bin:/usr/local/app/mysql/bin:/home/kingnet/bin:/usr/local/app/tools/libxml2/bin:/usr/local/app/tools/sqlite3/bin:/usr/local/app/tools/ruby/bin:/usr/kerberos/bin:/usr/local/app/tools/mysql/bin:/home/kingnet/bin:/usr/local/app/tools/mysql/bin
export LD_LIBRARY_PATH=/usr/local/app/tools/libevent/lib:/usr/local/app/tools/sqlite3/lib:/usr/local/app/tools/zlib/lib:/usr/local/app/tools/bzip2/lib:/usr/local/app/tools/mysql/lib/mysql:/usr/local/app/tools/logserver/lib:/usr/local/app/tools/tokyocabinet/lib:/usr/local/app/tools/tokyotyrant/lib:/usr/local/app/tools/curl/lib
export C_INCLUDE_PATH=$base_dir/curl/include
export CPLUS_INCLUDE_PATH=$base_dir/curl/include

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30936525/viewspace-2097991/,如需转载,请注明出处,否则将追究法律责任。

上一篇: Cacti 迁移数据库
请登录后发表评论 登录
全部评论

注册时间:2016-02-29

  • 博文量
    203
  • 访问量
    218052