[英]Error while zabbix installation
Below are the steps i folowed while zabbix installation: 以下是我在安装zabbix时遵循的步骤:
Then when i am executing : make install
then i am seeing the below exception. 然后,当我执行时:
make install
然后我看到以下异常。 Please help me figuring out the problem. 请帮助我解决问题。 Thanks.
谢谢。
../../../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
EDIT DETAILS: As per one comment i tried installing mysql-devel ie yum install mysql-devel
but i got below error: 编辑详细信息:按照一条评论,我尝试安装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
Can somebody please help me in getting rid of the situation. 有人可以帮我摆脱这种情况。 Thanks.
谢谢。
EDIT details: Below are the things which i find when i do fire the command: ls -l /etc/yum.repos.d/
编辑详细信息:以下是我执行命令时发现的内容:
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
EDIT details: At last the issue got solved and many thanks to Michael Tabolsky and Joao Figueiredo . 编辑详细信息:终于解决了这个问题,非常感谢Michael Tabolsky和Joao Figueiredo 。 :
:
cat /etc/yum.repos.d/remi.repo
猫/etc/yum.repos.d/remi.repo
and found out that remi repo was disabled. 并发现remi repo已被禁用。 Then edited it through
然后通过编辑
vi /etc/yum.repos.d/remi.repo.
vi /etc/yum.repos.d/remi.repo。
changed enabled=0
to enabled=1
. 将
enabled=0
更改为enabled=1
。 Then did a yum install mysql-devel
and it worked. 然后做了一个
yum install mysql-devel
并成功了。
Your problem is not in installing zabbix, but in compiling it. 您的问题不是安装zabbix,而是编译它。 You are missing the mysql headers.
您缺少mysql标头。
yum install mysql-devel
However, I really don't know why you try to compile. yum install mysql-devel
但是,我真的不知道为什么要尝试编译。 Also the old version. 也是旧版本。 For el distros (RHEL, CentOS, Scientific) use the EPEL repo, it has the 2.0 there.
对于发行版(RHEL,CentOS,Scientific),请使用EPEL存储库,其中包含2.0。 Edit: link to EPEL repo as requested, follow the instructions for your distribution: http://fedoraproject.org/wiki/EPEL then
yum list zabbix2*
andinstall what you need. 编辑:根据要求链接到EPEL存储库,按照分发说明进行操作: http :
yum list zabbix2*
然后yum list zabbix2*
安装所需的文件。
and your sql files are here 和你的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
Trying, your way overcomplicating. 尝试,让您的方法变得过于复杂。
Why would you try to compile such an obsolete version? 您为什么要尝试编译这样的过时版本? The last time I've compiled 1.8 was about an year ago.
我上次编译1.8的时间是大约一年前。
Though you don't specify your distro, you can follow up from here, 尽管您未指定发行版本,但可以从此处继续进行操作,
https://www.zabbix.com/documentation/2.0/manual/installation/install_from_packages https://www.zabbix.com/documentation/2.0/manual/installation/install_from_packages
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.