zoukankan      html  css  js  c++  java
  • 安装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!

    祝福你好运!

  • 相关阅读:
    stm32f103和stm32f407的GPIO口模式设置以及相互对应的关系
    基于STM32单片机实现屏幕休眠后OLED屏幕滚动效果
    基于51单片机的超声波模块HC-SR04的使用
    用51单片机控制L298N电机驱动模块
    学习笔记——51单片机 单片机与单片机之间的通讯
    基于51单片机的电子密码锁—1
    LCD1602学习调试
    基于51单片机,通过定时器实现的时钟程序
    有进度条圆周率计算
    python turtle 学习笔记
  • 原文地址:https://www.cnblogs.com/sbaicl/p/2776410.html
Copyright © 2011-2022 走看看