3

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?

Usman Ismail
  • 17,999
  • 14
  • 83
  • 165
  • Wow that's a bit harsh, I thought this question would require some scripting or jar tinkering which is in the purview of programming. Anyway I got the answer I needed. – Usman Ismail May 20 '12 at 15:57

1 Answers1

3

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.

larsks
  • 277,717
  • 41
  • 399
  • 399
  • Thanks yeah something is broken in that someone installed 5.5.22_Internal which means anything that depends on 5.5.22 is now broken. Hopefully internal is not really changing anything major – Usman Ismail May 10 '12 at 16:15
  • The *best* solution would be to rebuild your local `mysql` package and move the `internal` part of the name to the `release` header, instead of making it part of the `version`. This would probably allow everything to Just Work. – larsks May 10 '12 at 16:16
  • Unfortunately, can't do that political reasons its owned by another team *sigh* – Usman Ismail May 10 '12 at 21:57