从 YUM 更新中排除特定的存储库

Rob*_*bin 15 redhat yum rhel5 php5 epel

我正在 RHEL 5.5 上进行系统范围的 yum 更新,而 IUS EPEL 存储库抛出了一个缺少依赖项错误:

php53-mcrypt-5.3.3-4.ius.el5.x86_64 from installed has depsolving problems
--> Missing Dependency: php53-common = 5.3.3-4.ius.el5 is needed by package php53-mcrypt-   5.3.3-4.ius.el5.x86_64 (installed)
Error: Missing Dependency: php53-common = 5.3.3-4.ius.el5 is needed by package php53-mcrypt-5.3.3-4.ius.el5.x86_64 (installed)
Run Code Online (Sandbox Code Playgroud)

有没有办法针对所有其他存储库运行 YUM 更新而忽略 IUS EPEL 存储库以跳过此依赖项问题?

澄清

我正在尝试仅从 Redhat Network 安装更新。我找不到存储库名称,因此我无法执行类似操作,sudo yum --disablerepo=* --enablerepo=rhel update因为我使用的 yum 版本不支持 .yum 之后列出的多个存储库--disablerepo

更新

我的临时解决方法是运行sudo yum --exclude=php53* update. 我相信有更好的方法。这个更好的方法包括修复实际问题,所以我也向IUS 社区项目提交了一个错误。

更新 #2

看起来我发现了依赖的问题。我仍然认为应该有一个可行的解决方法。

谢谢!

pla*_*d87 24

尝试禁用 repo 开关:

--disablerepo=REPONAME
Run Code Online (Sandbox Code Playgroud)

更新

要查找当前“已知”(启用和禁用)的所有存储库:

yum repolist all
Run Code Online (Sandbox Code Playgroud)

然后要找到哪个存储库让您对上述包感到悲伤,请尝试:

yum list php53-mcrypt-5.3.3-4.ius.el5.x86_64 --showduplicates
Run Code Online (Sandbox Code Playgroud)

这将显示您的哪个存储库提供了上述包(您也会在列表中看到“已安装”,以显示本地安装的包)。

一旦您使用禁用 repo 开关知道存储库,请再次尝试禁用开关。

yum update --disablerepo=[from above]
Run Code Online (Sandbox Code Playgroud)

如果上述步骤未能挑出您想要省略的存储库,请尝试查看/etc/yum.repos.d/,这是存储库定义的 RHEL 默认位置。进入此目录后,找到所有非标准 RHEL 基础和更新存储库文件并包含enabled=0,例如,

[repo]
enabled=0
Run Code Online (Sandbox Code Playgroud)

希望这可以帮助。