Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying install the MySQL Client libraries for the Perl Mod of the same name but when I run

sudo rpm --install -v --allfiles MySQL-client-5.5.16-1.linux2.6.i386.rpm

and querying the rpm database shows the package installed, but the lib files aren't there.

 rpm -qa | grep -i mysql
 MySQL-client-5.5.16-1.linux2.6
 ll /usr/lib/mysql
 total 4.0K
 4.0K drwxr-xr-x 3 root root 4.0K Oct 11 09:49 plugin/

I'm not finding the files in /usr/lib

ls -ld /usr/lib/*mysql*
drwxr-xr-x 3 root root 4.0K Oct 11 09:49 /usr/lib/mysql
perlstation:~\ ->

Here's the results of rpm -qil MySQL-client

    rpm -qil MySQL-client
Name        : MySQL-client                 Relocations: (not relocatable)
Version     : 5.5.16                            Vendor: Oracle and/or its affiliates
Release     : 1.linux2.6                    Build Date: Fri 09 Sep 2011 11:27:55 AM CDT
Install Date: Tue 11 Oct 2011 02:38:14 PM CDT      Build Host: loki32
Group       : Applications/Databases        Source RPM: MySQL-5.5.16-1.linux2.6.src.rpm
Size        : 53026574                         License: Copyright (c) 2000, 2011,    Oracle and/or its affiliates. All rights reserved. Under GPL license as shown in the Description field.
Signature   : DSA/SHA1, Wed 14 Sep 2011 03:13:49 AM CDT, Key ID 8c718d3b5072e1f5
Packager    : MySQL Build Team <build@mysql.com>
URL         : http://www.mysql.com/
Summary     : MySQL - Client
Description :
This package contains the standard MySQL clients and administration tools.

For a description of MySQL see the base MySQL RPM or http://www.mysql.com/
/usr/bin/msql2mysql
/usr/bin/mysql
/usr/bin/mysql_find_rows
/usr/bin/mysql_waitpid
/usr/bin/mysqlaccess
/usr/bin/mysqlaccess.conf
/usr/bin/mysqladmin
/usr/bin/mysqlbinlog
/usr/bin/mysqlcheck
/usr/bin/mysqldump
/usr/bin/mysqlimport
/usr/bin/mysqlshow
/usr/bin/mysqlslap
/usr/share/man/man1/msql2mysql.1.gz
/usr/share/man/man1/mysql.1.gz
/usr/share/man/man1/mysql_find_rows.1.gz
/usr/share/man/man1/mysql_waitpid.1.gz
/usr/share/man/man1/mysqlaccess.1.gz
/usr/share/man/man1/mysqladmin.1.gz
/usr/share/man/man1/mysqlbinlog.1.gz
/usr/share/man/man1/mysqlcheck.1.gz
/usr/share/man/man1/mysqldump.1.gz
/usr/share/man/man1/mysqlimport.1.gz
/usr/share/man/man1/mysqlshow.1.gz
/usr/share/man/man1/mysqlslap.1.gz
perlstation:~\ ->

I'm at a loss here.

share|improve this question
    
Which Linux distribution (and wich major version) are you talking about? –  Nils Oct 11 '11 at 20:37
    
Linux version 2.6.18-164.2.1.el5 –  phileas fogg Oct 12 '11 at 21:21
    
What does rpm -qil MySQL-client show? –  Gilles Oct 12 '11 at 21:31
    
Shows files installed in /usr/bin and /usr/share but nowhere else –  phileas fogg Oct 12 '11 at 21:50
    
What about the -i part? Specifically, check what packages MySQL-client depends on. There's probably a package like libmysqlclient14 that contains the library you want. And please post the output of ls -ld /usr/lib/*mysql* (this exact command, please, not another one that doesn't work). –  Gilles Oct 12 '11 at 22:31

2 Answers 2

What were you expecting to see in /usr/lib/mysql? That directory seems to contain only plug-ins. The MySQL client library is /usr/lib/libmysqlclient.so.*. It should be there; probably not from the MySQL-client package, but from a library package that MySQL-client depends on. More generally, all dynamic library file names begin with lib and end with .so.

share|improve this answer
    
There are no /usr/lib/libmysqlclient.so.* in /usr/lib ls /usr/lib | grep /usr/lib/libmysqlclient.so.* perlstation:~\ -> –  phileas fogg Oct 12 '11 at 19:59
    
@phileasfogg If you typed the same command as the one in your comment, it's not doing anything useful: if you do have these libraries, then grep /usr/lib/libmysqlclient.so.* expands to e.g. 'grep /usr/lib/libmysqlclient.so.16 /usr/lib/libmysqlclient.so.16.0.0', i.e. searching the string /usr/lib/libmysqlclient.so.16 in the file /usr/lib/libmysqlclient.so.16.0.0. To see if the files exist, run ls /usr/lib/libmysqlclient.so.*. –  Gilles Oct 12 '11 at 21:31
    
Good point, but as my find search above shows the libraries don't seem to be anyway on the machine. –  phileas fogg Oct 12 '11 at 21:49
    
@phileasfogg No, your find command is looking for the exact name libmysqlclient.so, but you should be looking for libmysqlclient.so.16 (or some other number). Not that the find is useful: if you have the library, it'll be in /usr/lib. –  Gilles Oct 12 '11 at 22:32

Its always necessary check the package dependencies with rpm. Do you have the other packages downloaded in the same directory where the mysql-client package is being installed from. Since rpm does not have provide dependency resolution it self, its necessary that tools like yum have come into the picture to make it easy for rpms installation. Incase of this, I suggest to either resolve the package dependency self, or better have yum configured on the host and let yum take the burden of dependency resolution and have them installed through rpm.

In your above case, if you are really seeing that your files are not installed while the rpm claims the files to be present in the package which is installed. A simple method to re-verify it would be.

rpm -ql MySQL-client-5.5.16-1 | xargs ls -ld

If you are seeing all the files present, then rpm is right that you have all the files present from the client package. If not, then there is something wrong, it could be that the mysql-client package was actually installed but some rogue user?/process had deleted those files from their installation place?. It could be possible. For which, rpm does not guarantee since it all it checks and references from its rpmdb. I would suggest to erase the package and reinstall the MySQL client package. Perform all the necessary dependency resolutions as necessary.

Also, not this is related to RPM, but incase you are intending to use mysql from perl, you do not necessarily have to depend on DBI/DBD::MySQL perl packages instead you can use standalone Tsucchi's Net::MySQL perl package, which does not have a need to bind to mysql libraries nor depends on the installation of mysql in anycase. Just fork/clone this package from github and you are all set to use mysql from perl non-interactively, there is also a small script that works as mysql shell incase you are interested. forked repository is at https://github.com/mnikhil-git/p5-Net-MySQL

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.