2013-06-03 187 views
0

下面是步驟i folowed而ZABBIX安裝:錯誤而ZABBIX安裝

  1. 焦油-zxf ZABBIX-1.8.tar.gz
  2. 在MySQL中建立
  3. 百勝安裝iksemel-devel的的的zabbix數據庫
  4. 百勝安裝的net-snmp-devel的
  5. 的./configure --enable-服務器--enable-劑--with-mysql的--with-NET-SNMP --with-jabber的--with-的libcurl

然後當我執行:make install然後我看到下面的例外。請幫我解決問題。謝謝。

../../../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 `/root/xyy/zabbix-1.8.4/src/libs/zbxdb' 
make[2]: *** [install-recursive] Error 1 
make[2]: Leaving directory `/root/xyz/zabbix-1.8.4/src/libs' 
make[1]: *** [install-recursive] Error 1 
make[1]: Leaving directory `/root/xyz/zabbix-1.8.4/src' 
make: *** [install-recursive] Error 1 

編輯詳細信息: 作爲每一個評論我嘗試安裝的mysql-devel的即yum install mysql-devel但我得到以下錯誤:

Error: Package: mysql-devel-5.1.69-1.el6_4.x86_64 (updates) 
      Requires: mysql = 5.1.69-1.el6_4 
      Installed: mysql-5.5.28-1.el6.remi.x86_64 (@remi) 
       mysql = 5.5.28-1.el6.remi 
      Available: mysql-5.1.66-2.el6_3.x86_64 (base) 
       mysql = 5.1.66-2.el6_3 
      Available: mysql-5.1.67-1.el6_3.x86_64 (updates) 
       mysql = 5.1.67-1.el6_3 
      Available: mysql-5.1.69-1.el6_4.x86_64 (updates) 
       mysql = 5.1.69-1.el6_4 
You could try using --skip-broken to work around the problem 

有人可以請幫我擺脫的情況。謝謝。

編輯詳細信息:下面是我找到的東西,當我做火的命令:ls -l /etc/yum.repos.d/

-rw-r--r-- 1 root root 1926 Jun 26 2012 CentOS-Base.repo 
-rw-r--r-- 1 root root 637 Jun 26 2012 CentOS-Debuginfo.repo 
-rw-r--r-- 1 root root 626 Jun 26 2012 CentOS-Media.repo 
-rw-r--r-- 1 root root 2593 Jun 26 2012 CentOS-Vault.repo 
-rw-r--r-- 1 root root 475 Aug 19 2012 ZabbixZone.repo 
-rw-r--r-- 1 root root 1056 Nov 5 2012 epel-testing.repo 
-rw-r--r-- 1 root root 957 Aug 21 2012 epel.repo 
-rw-r--r-- 1 root root 739 Nov 13 2010 mirrors-rpmforge 
-rw-r--r-- 1 root root 717 Nov 13 2010 mirrors-rpmforge-extras 
-rw-r--r-- 1 root root 728 Nov 13 2010 mirrors-rpmforge-testing 
-rw-r--r-- 1 root root 633 Nov 13 2010 remi.repo 
-rw-r--r-- 1 root root 1113 Aug 21 2012 rpmforge.repo 
-rw-r--r-- 1 root root 401 Jan 25 23:10 zabbix.repo 

編輯詳細信息:最後,問題得到了解決,非常感謝Michael TabolskyJoao Figueiredo。 :

cat /etc/yum.repos.d/remi.repo

並發現remi repo被禁用。然後編輯它通過

vi /etc/yum.repos.d/remi.repo.

改變enabled=0enabled=1。然後做了一個yum install mysql-devel它工作。

+0

您已經安裝的MySQL。 yum試圖從centos updates repo安裝mysql-devel,並且因爲版本不匹配而失敗。安裝mysql-dev remi repo: 'yum --enable-repo = remi install mysql-devel' or downgrade to official mysql: 'yum downgrade mysql' 'yum install mysql-devel' –

回答

3

你的問題不在於安裝zabbix,而是在編譯它。你錯過了mysql頭文件。 yum install mysql-devel 但是,我真的不知道你爲什麼要編譯。也是舊版本。對於el發行版(RHEL,CentOS,Scientific)使用EPEL回購,它有2.0。 編輯:根據要求鏈接到EPEL回購,按照您的發行說明: http://fedoraproject.org/wiki/EPEL 然後yum list zabbix2*並安裝您所需的。

和您的SQL文件的位置

 
rpm -ql zabbix-server-mysql-2.0.5-1.el6.x86_64 | grep create 
/usr/share/doc/zabbix-server-mysql-2.0.5/create 
/usr/share/doc/zabbix-server-mysql-2.0.5/create/data.sql 
/usr/share/doc/zabbix-server-mysql-2.0.5/create/images.sql 
/usr/share/doc/zabbix-server-mysql-2.0.5/create/schema.sql 
+0

我找不到直接安裝指南。你能給我一個鏈接嗎?謝謝! – Trying

+0

更新了答案,以回答您的更多問題。 –

+0

我編輯了這個問題。我無法按照如何鏈接到EPEL回購。謝謝。 – Trying

1

嘗試, 自己的方式過於複雜。

爲什麼你會嘗試編譯這樣一個過時的版本? 我上次編譯1.8版的時間大約在一年前。

雖然你沒有指定你的發行版,你可以從這裏跟進,從現在可能將禁用雷米回購
https://www.zabbix.com/documentation/2.0/manual/installation/install_from_packages

+0

非常感謝您的回覆。我失去了希望。我已經嘗試了你所提供的鏈接。但是,當我來到步驟**創建初始數據庫**我無法找到'/ usr/share/doc/zabbix-server-mysql-2.0.4/create'目錄。你能幫忙解決這個問題嗎?我將自己評爲UNIX世界的首發。謝謝。 – Trying

+0

不要失去希望。你從來沒有提過你的發行版.. 如果沒有其中一些文件位於到您的文件結構的線索,你可以 updatedb的(需要root權限) 找到「path_you_are_looking_for」 例如, 找到ZABBIX服務器-mysql-2 會指示您創建目錄的位置。 –