安裝zabbix使出錯
安裝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
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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- zabbix安裝
- 【ZABBIX】Linux下安裝ZABBIXLinux
- 【zabbix】zabbix遠端安裝部署
- zabbix安裝agent
- Zabbix安裝部署
- Zabbix Agent安裝
- apt安裝zabbixAPT
- 【Zabbix】zabbix_agent安裝指令碼指令碼
- zabbix安裝—–nginx安裝和配置Nginx
- 編譯安裝zabbix編譯
- 【監控】Zabbix安裝
- zabbix的安裝配置
- zabbix一鍵安裝
- zabbix原始碼安裝原始碼
- zabbix3.0安裝
- Zabbix-2.4.5 安裝
- zabbix安裝文件薦
- zabbix5.0安裝
- Zabbix 2.2安裝MySQL MPM外掛報錯'Connection to zabbix server failed (rc=1305)'MySqlServerAI
- Zabbix 的容器版安裝
- Zabbix監控安裝部署
- centos8 安裝zabbixCentOS
- Zabbix Agent 安裝與使用
- Centos7-安裝ZabbixCentOS
- zabbix 安裝配置介紹
- 詳解zabbix安裝部署
- 安裝Zabbix(多種方式)
- 安裝配置zabbix-serverServer
- zabbix2.4yum安裝
- zabbix環境安裝搭建
- zabbix 客戶端安裝客戶端
- Windows下安裝Zabbix AgentdWindows
- Ubuntu安裝zabbix配置教程Ubuntu
- zabbix安裝中文環境
- Zabbix安裝部署(國內源映象)----一次性解決centos7安裝zabbix報錯:[Errno 256] 的問題CentOS
- Docker映像的Zabbix元件安裝Docker元件
- Zabbix 簡介與yum安裝
- centos7安裝zabbix 5.0CentOS