Installing multiple versions of the same package using yum?

I have a server with a weird internal version of MySQL and you want to install collectd on node. Unfortunately, collectd has a dependency on MySQL, and it fails to install because it expects a specific version of MySQL where the installed version is unique internal.

Is it possible to install the second version of mysql to get past the yum error? or make yum consider it installed?

+2
source share
2 answers

As a rule, it is not possible to install two versions of the same package. Usually this leads to unsolvable file conflicts, although there are rare cases where you can have several versions of a package without conflicts (for example, the kernel package).

You can create a “fake” package that satisfies the missing dependency, although this means that something on your system is fundamentally broken (as a rule, someone installed something that was not really intended for use in the particular distribution you are using) . You will need to create a specification file with the Provides: line corresponding to your dependency, line by line:

 Provides: mysql = 5.5.22 

I once wrote a tool called fakeprovide that helps with such things ... if nothing else it can provide you with a template specification file for working with.

You can also grab the source RPM for collectd and rebuild it for compatibility with the version of MySQL installed on your system.

+2
source

I do not recommend this approach, but you can definitely force any package to be installed using the -f switch in rpm . He will install it, ignoring the fact that a certain version of mysql is not installed. Many times it works without problems, but more than once ... :(

 rpm -f <package>.rpm 
+1
source

Source: https://habr.com/ru/post/1442244/


All Articles