RE: *** MySQL library could not be located... ****

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
symphonynagios
Posts: 14
Joined: Wed Jan 28, 2015 2:05 pm

RE: *** MySQL library could not be located... ****

Post by symphonynagios »

Hi,

We are getting below error while configuring NDOUTIL.
also tried configuring using ./configure --with-mysql=/usr/lib/mysql but still same error.
*** MySQL library could not be located... **************************

You chose to compile NDOutils 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.
installed, use the --with-mysql=DIR argument to specify the
location of the MySQL library, We assume mysql_config is in DIR/dir
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=/usr/lib/mysql

Performed all the 4 steps and tried still same error..
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: RE: *** MySQL library could not be located... ****

Post by jdalrymple »

What OS?

You're also going to need mysql development libraries. If using RHEL or EL based:

Code: Select all

yum install -y mysql-devel
symphonynagios
Posts: 14
Joined: Wed Jan 28, 2015 2:05 pm

Re: RE: *** MySQL library could not be located... ****

Post by symphonynagios »

lnx0035:root# yum install -y mysql-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Setting up Install Process
Package mysql-devel-5.1.66-2.el6_3.x86_64 already installed and latest version
Nothing to do


OS: lnx0035:root# cat /etc/redhat-release
CentOS release 6.3 (Final)
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: RE: *** MySQL library could not be located... ****

Post by jdalrymple »

Try:

Code: Select all

./configure --with-mysql=/usr/lib64/mysql
symphonynagios
Posts: 14
Joined: Wed Jan 28, 2015 2:05 pm

Re: RE: *** MySQL library could not be located... ****

Post by symphonynagios »

Hi Tried with ./configure --with-mysql=/usr/lib64/mysql but same error.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: RE: *** MySQL library could not be located... ****

Post by jolson »

Are all of the appropriate packages installed?

Code: Select all

yum install mysql-libs mysql-server mysql-devel mysql

Code: Select all

rpm -qa | grep mysql
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
symphonynagios
Posts: 14
Joined: Wed Jan 28, 2015 2:05 pm

Re: RE: *** MySQL library could not be located... ****

Post by symphonynagios »

lnx0035:root# yum install mysql-libs mysql-server mysql-devel mysql
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Setting up Install Process
Package mysql-libs-5.1.66-2.el6_3.x86_64 already installed and latest version
Package mysql-server-5.1.66-2.el6_3.x86_64 already installed and latest version
Package mysql-devel-5.1.66-2.el6_3.x86_64 already installed and latest version
Package mysql-5.1.66-2.el6_3.x86_64 already installed and latest version
Nothing to do

lnx0035:root# rpm -qa | grep mysql
mysql-devel-5.1.66-2.el6_3.x86_64
libdbi-dbd-mysql-0.8.3-5.1.el6.x86_64
mysql-server-5.1.66-2.el6_3.x86_64
php-mysql-5.3.3-22.el6.x86_64
mysql-5.1.61-4.el6.i686
mysql-5.1.66-2.el6_3.x86_64
mysql-libs-5.1.61-4.el6.i686
mysql-libs-5.1.66-2.el6_3.x86_64
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: RE: *** MySQL library could not be located... ****

Post by jdalrymple »

Something is a bit wonky. What do the contents and permissions of that directory look like? You may want to yum erase then yum install those packages jolson mentioned:

Code: Select all

[jdalrymple@localhost ~]$ ll /usr/lib64/mysql
total 3136
lrwxrwxrwx 1 root root      26 Apr 23 14:49 libmysqlclient_r.so -> libmysqlclient_r.so.16.0.0
lrwxrwxrwx 1 root root      26 Apr 23 14:49 libmysqlclient_r.so.16 -> libmysqlclient_r.so.16.0.0
-rwxr-xr-x 1 root root 1595240 Feb 12  2014 libmysqlclient_r.so.16.0.0
lrwxrwxrwx 1 root root      24 Apr 23 14:49 libmysqlclient.so -> libmysqlclient.so.16.0.0
lrwxrwxrwx 1 root root      24 Apr 23 14:49 libmysqlclient.so.16 -> libmysqlclient.so.16.0.0
-rwxr-xr-x 1 root root 1584680 Feb 12  2014 libmysqlclient.so.16.0.0
-rwxr-xr-x 1 root root   12935 Feb 12  2014 mysqlbug
-rwxr-xr-x 1 root root    6399 Feb 12  2014 mysql_config
drwxr-xr-x 2 root root    4096 Apr 23 14:49 plugin
symphonynagios
Posts: 14
Joined: Wed Jan 28, 2015 2:05 pm

Re: RE: *** MySQL library could not be located... ****

Post by symphonynagios »

Erased and re-installed and configured by ./configure --with-mysql=/usr/lib64/mysql
But still same error...

------------------------------------------------------------------------------------------
-rwxr-xr-x 1 root root 6399 Dec 7 2012 mysql_config
-rwxr-xr-x 1 root root 12923 Dec 7 2012 mysqlbug
-rwxr-xr-x 1 root root 1582952 Dec 7 2012 libmysqlclient.so.16.0.0
-rwxr-xr-x 1 root root 1595176 Dec 7 2012 libmysqlclient_r.so.16.0.0
lrwxrwxrwx 1 root root 24 May 12 03:34 libmysqlclient.so.16 -> libmysqlclient.so.16.0.0
lrwxrwxrwx 1 root root 26 May 12 03:34 libmysqlclient_r.so.16 -> libmysqlclient_r.so.16.0.0
drwxr-xr-x 2 root root 4096 May 12 03:34 plugin
lrwxrwxrwx 1 root root 24 May 12 03:34 libmysqlclient.so -> libmysqlclient.so.16.0.0
lrwxrwxrwx 1 root root 26 May 12 03:34 libmysqlclient_r.so -> libmysqlclient_r.so.16.0.0
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: RE: *** MySQL library could not be located... ****

Post by jdalrymple »

Double check /etc/ld.so.conf.d/ maybe and run ldconfig?

Code: Select all

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.
Locked