YUM dependency issue even though library is installed

We build our own php and mysql packages from source, this one is for the php-5.4.10 release, and host these at our own repository. Let's call this package custom-php and custom-mysql(-libs & -server)

When I do a yum install custom-php on a server, yum lists a dependency problem:

--> Finished Dependency Resolution
Error: Package: custom-php-1.1.x86_64 (php)
           Requires: libmysqlclient.so.18(libmysqlclient_16)(64bit)
Error: Package: custom-php-1.1.x86_64 (php)
           Requires: libmysqlclient.so.18(libmysqlclient_18)(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

The file libmysqlclient.so.18 is provided by custom-mysql-libs which is listed under Requires in the spec file of custom-php. Even if I install custom-mysql-libs manually before issuing the yum install custom-php I still get the error above.

Our custom-mysql-libs is built from the mysql source code and provides the libmysqlclient.so:

$ rpm -qlp custom-mysql-libs-1.0.x86_64.rpm 
/custom/lib64/libmysqlclient.so
/custom/lib64/libmysqlclient.so.18
/custom/lib64/libmysqlclient.so.18.0.0
....
$ 

As we install the libraries at a different place the custom-mysql-libs issues a ldconfig with the path specified in a file under /etc/ld.so.conf.d/ after completion. I verified that the libraries are visible with a ldconfig -v

# ldconfig -v
...
/custom/lib64:
        libmysqlclient.so.18 -> libmysqlclient.so.18.0.0
...
#

Yum does also find the library and package:

# yum whatprovides */libmysqlclient.so.18
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
custom-mysql-libs-1.0.x86_64 : Custom MySQL libraries
Repo        : custom
Matched from:
Filename    : /custom/lib64/libmysqlclient.so.18

custom-mysql-libs-1.0.x86_64 : Custom MySQL libraries
Repo        : installed
Matched from:
Filename    : /custom/lib64/libmysqlclient.so.18

Any help is appreciated. Thanks !


rpm does not know anything about local filesystems. It only looks in it's own database for what is on the system. In your case that is a non-standard place to put the library. Generally the standard place is in /usr/lib64/mysql/ and yours is in /custom so rpm is not finding it where it should be.

Here are two options..

1) rebuild the custom one by adding some symlinks and that might work (really un-tested)

2) Force the install with the --no-deps flag and symlink the mysqllibrary files from /custom to /usr/lib64/mysql/

I don't think there is any magic command that we can give you to make it work as you are hoping.


yum and rpm are unable to track anything you do behind its back. Thus, if you install things outside the standard package distributions, these nifty neat helpers like yum don't have enough programming to anticipate this. You'll have to take much more responsibility for manually handling errors like this.

Generally, what I do is to try not to bypass the systems and use the packaging system as much as possible. Like if I rebuild a package to my specs, I download the source of the package and remake a new package after making my modifications and such.