安装ndoutils 提示“MySQL library could not be located”错误!

在配置Nagios+Cacti时,安装Ndoutils时,出现了问题!

  运行命令如下:

[root@rhel ndoutils-1.4b9]# ./configure –prefix=/usr/local/nagios –enable-mysql –disable-pgsql –with-mysql-inc=/usr/include/mysql –with-mysql-lib=/usr/lib/mysql

  问题提示内容如下:

复制代码
* MySQL library could not be located… ******************
You chose to compile NDBXT with MySQL support, but I was unable to
locate the MySQL library on your system. If the library is
installed, use the –with-mysql-lib argument to specify the
location of the MySQL library.
NOTE: After you install the necessary libraries on your system:
1. Make sure /etc/ld.so.conf has an entry for the directory in
which the MySQL libraries are installed.
2. Run ‘ldconfig’ to update the run-time linker options.
3. Run ‘make devclean’ in the NDBXT distribution to clean out
any old references to your previous compile.
4. Rerun the configure script.
TIP: Try the following….
./configure –with-mysql-lib=/usr/lib/mysql
复制代码

  解决过程:

  百度很久了,都没有找到我想要的答案。不过,有个有关于64位系统的解决方法,如下:

将上述运行命令修改为,即可:
[root@rhel ndoutils-1.4b9]#./configure –prefix=/usr/local/nagios/ –enable-mysql –disable-pgsql –with-mysql-inc=/usr/include/mysql –with-mysql-lib=/usr/lib64/mysql
  而对于32位的系统呢?像都找不到答案,后来想想,由于自己的MySQL是直接用yum安装的(lib位置为系统默认),所以直接不指定MySQL的位置,这样就可以通过configure了!如下:

[root@rhel ndoutils-1.4b9]#./configure –prefix=/usr/local/nagios/ –enable-mysql –disable-pgsql
  然后在最后那里可以看到如下的内容,表明已经通过了!

checking for mysql_config… /usr/bin/mysql_config

checking for mysql_init in -lmysqlclient… yes

MySQL library and include file(s) were found!

祝福你好运!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值