使用 yum 安装同一软件包的多个版本? [英] Installing multiple versions of the same package using yum?

查看:42
本文介绍了使用 yum 安装同一软件包的多个版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台装有奇怪内部 MySQL 版本的服务器,我想在该节点上安装 collectd.不幸的是,collectd 依赖于 MySQL,并且安装失败,因为它期望某个版本的 MySQL,而安装的版本是唯一的内部版本.

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.

是否可以安装第二个 mysql 版本来解决 yum 错误?还是让 yum 认为它已安装?

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

推荐答案

通常不可能安装同一个包的两个版本.这通常会导致无法解决的文件冲突,尽管在极少数情况下,您可以安装多个版本的软件包而不会发生冲突(例如,kernel 软件包).

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).

可能创建一个假"包来满足缺失的依赖关系,尽管这样做表明你系统上的某些东西从根本上被破坏了(通常,有人安装了一些不是真的用于您正在使用的特定发行版).您需要创建一个规范文件,其中 Provides: 行与您的依赖项匹配,如下所示:

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

曾几何时,我编写了一个名为 fakeprovide 的工具,可以帮助解决此类问题..如果没有别的,它可能会给你一个模板规范文件来使用.

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.

您还可以获取 collectd 的源 RPM 并重建它以与您系统上安装的 MySQL 版本兼容.

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

这篇关于使用 yum 安装同一软件包的多个版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆