Linux – Installing multiple versions of the same package using yum?

linuxyum

I have a server with a weird internal version of MySQL installed and want to install collectd on that node. Unfortunately collectd has a dependency on MySQL and it fails the install because its expecting a certain version of MySQL where as the version of the installed one is a unique internal one.

Is it possible to install a second mysql version just to get past the yum error? or to make yum think its installed?

Best Answer

It is generally not possible to install two versions of the same package. This usually results in unresolvable file conflicts, although there are rare cases in which you can have multiple versions of a package installed without conflict (e.g., the kernel package).

It is possible to create a "fake" package that fulfills the missing dependency, although doing so indicates that something on your system is fundamentally broken (typically, someone has installed something that wasn't really intended for use on the particular distribution you're using). You would need to create a spec file with a Provides: line matching your dependency, along the lines of:

Provides: mysql = 5.5.22

Once upon a time I wrote a tool called fakeprovide that helps out with this sort of thing...if nothing else it might give you a template spec file to work with.

You could also grab the source RPM for collectd and rebuild it to be compatible with the version of MySQL installed on your system.

Related Topic