Ubuntu Server 13.04;Zabbix 源代码实际版本;MariaDB 5.5
首先我下载并解压了 Zabbix 源代码。之后:
./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl
但出现错误。从日志中:
configure:7488: checking for mysql_config
configure:7521: result: no
configure:7719: error: MySQL library not found
我该如何解决这个问题?例如,phpmyadmin 看到 libmysql - 5.5.31-MariaDB,并且我也安装了 libmysqlclient18:
libmysqlclient18 is already the newest version.
libmysqlclient18 set to manually installed.
尝试强制定义库的路径:
--with-mysql=/usr/lib/
服务器应答:
checking for mysql_config... /usr/lib/
./configure: line 7529: /usr/lib/: Is a directory
./configure: line 7531: /usr/lib/: Is a directory
我真的不知道这是错误还是仅仅是警告,并且它已经找到了库。
尝试安装 -dev 包:
mammuthus@server:~/zabbix-2.0.6$ sudo apt-get install libmysqlclient-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libmysqlclient-dev : Depends: libmysqlclient18 (= 5.5.31-0ubuntu0.13.04.1) but 5.5.31+maria-1~raring is to be installed
E: Unable to correct problems, you have held broken packages.
好的
mammuthus@server:~/zabbix-2.0.6$ sudo apt-get install libmysqlclient18
Reading package lists... Done
Building dependency tree
Reading state information... Done
libmysqlclient18 is already the newest version.
所以我已经有 -dev 工具了,是吗?
答案1
看起来您缺少 MariaDB 的开发标头。
假设您使用MariaDB 存储库对于 Ubuntu 13,尝试安装 libmariadbdclient-dev来自该存储库。
您甚至可以*-dev
从以下位置手动下载软件包其中一面镜子检查一下:
# atool -l libmariadbclient-dev_5.5.31+maria-1~raring_amd64.deb | grep mysql_config
-rwxr-xr-x root/root 6764 2013-05-22 01:48 ./usr/bin/mysql_config
-rw-r--r-- root/root 2127 2013-05-22 02:20 ./usr/share/man/man1/mysql_config.1.gz
有关如何构建包裹从上游 Zabbix 源检查这里。