我在 CentOS 8 服务器上收到一堆有关软件包更新的冲突错误消息containers-common
。runc
百胜输出:
/root>yum update --nobest
Last metadata expiration check: 0:16:51 ago on Fri 24 Sep 2021 03:59:35 PM EDT.
Dependencies resolved.
Problem: package containers-common-1:1.3.1-5.module_el8.4.0+886+c9a8d9ad.x86_64 requires runc, but none of the providers can be installed
- package containerd.io-1.4.9-3.1.el8.x86_64 conflicts with runc provided by runc-1.0.0-70.rc92.module_el8.4.0+673+eabfc99d.x86_64
- installed package containerd.io-1.4.9-3.1.el8.x86_64 obsoletes runc provided by runc-1.0.0-70.rc92.module_el8.4.0+673+eabfc99d.x86_64
- package containerd.io-1.4.9-3.1.el8.x86_64 conflicts with runc provided by runc-1.0.0-73.rc93.module_el8.4.0+830+8027e1c4.x86_64
- installed package containerd.io-1.4.9-3.1.el8.x86_64 obsoletes runc provided by runc-1.0.0-73.rc93.module_el8.4.0+830+8027e1c4.x86_64
- package containerd.io-1.4.9-3.1.el8.x86_64 conflicts with runc provided by runc-1.0.0-74.rc95.module_el8.4.0+886+c9a8d9ad.x86_64
- installed package containerd.io-1.4.9-3.1.el8.x86_64 obsoletes runc provided by runc-1.0.0-74.rc95.module_el8.4.0+886+c9a8d9ad.x86_64
- cannot install the best update candidate for package containers-common-1:1.2.2-10.module_el8.4.0+830+8027e1c4.x86_64
- cannot install the best update candidate for package containerd.io-1.4.9-3.1.el8.x86_64
- package runc-1.0.0-56.rc5.dev.git2abd837.module_el8.3.0+569+1bada2e4.x86_64 is filtered out by modular filtering
- package runc-1.0.0-64.rc10.module_el8.4.0+522+66908d0c.x86_64 is filtered out by modular filtering
- package runc-1.0.0-65.rc10.module_el8.4.0+819+4afbd1d6.x86_64 is filtered out by modular filtering
- package runc-1.0.0-70.rc92.module_el8.4.0+786+4668b267.x86_64 is filtered out by modular filtering
- package runc-1.0.0-71.rc92.module_el8.4.0+833+9763146c.x86_64 is filtered out by modular filtering
================================================================================================================================
Package Architecture Version Repository Size
================================================================================================================================
Skipping packages with conflicts:
(add '--best --allowerasing' to command line to force their upgrade):
runc x86_64 1.0.0-70.rc92.module_el8.4.0+673+eabfc99d appstream 3.1 M
runc x86_64 1.0.0-73.rc93.module_el8.4.0+830+8027e1c4 appstream 3.2 M
runc x86_64 1.0.0-74.rc95.module_el8.4.0+886+c9a8d9ad appstream 3.3 M
Skipping packages with broken dependencies:
containers-common x86_64 1:1.3.1-5.module_el8.4.0+886+c9a8d9ad appstream 95 k
Transaction Summary
================================================================================================================================
Skip 4 Packages
Nothing to do.
Complete!
/root>
我尝试了使用标志的建议--best --allowerasing
,但它表明我的 docker 环境会因删除一些重要的软件包而被损坏。
/root>yum update containers-common --best --allowerasing
Last metadata expiration check: 0:30:49 ago on Fri 24 Sep 2021 03:59:35 PM EDT.
Dependencies resolved.
================================================================================================================================
Package Architecture Version Repository Size
================================================================================================================================
Upgrading:
containers-common x86_64 1:1.3.1-5.module_el8.4.0+886+c9a8d9ad appstream 95 k
Installing dependencies:
runc x86_64 1.0.0-74.rc95.module_el8.4.0+886+c9a8d9ad appstream 3.3 M
Removing dependent packages:
containerd.io x86_64 1.4.9-3.1.el8 @docker-ce-stable 112 M
docker-ce x86_64 3:20.10.8-3.el8 @docker-ce-stable 95 M
docker-ce-rootless-extras x86_64 20.10.8-3.el8 @docker-ce-stable 16 M
Transaction Summary
================================================================================================================================
Install 1 Package
Upgrade 1 Package
Remove 3 Packages
Total download size: 3.4 M
Is this ok [y/N]: N
对于这些软件包更新冲突是否有永久的解决方法?
答案1
我遇到了同样的问题,解决此问题的唯一方法是运行此命令
dnf remove containers-common
当出现提示时,我点击“y
这删除了这些软件包”
Updating Subscription Management repositories.
Dependencies resolved.
=================================================================================================================================================================================
Package Architecture Version Repository Size
=================================================================================================================================================================================
Removing:
containers-common x86_64 1:1.2.2-10.module_el8.4.0+830+8027e1c4 @appstream 297 k
Removing dependent packages:
skopeo x86_64 1:1.2.2-10.module_el8.4.0+830+8027e1c4 @appstream 23 M
Removing unused dependencies:
crun x86_64 0.18-2.module_el8.4.0+830+8027e1c4 @appstream 470 k
yajl x86_64 2.1.0-10.el8 @appstream 85 k
Transaction Summary
=================================================================================================================================================================================
Remove 4 Packages
然后我可以通过运行成功更新我的系统
dnf update -y
以下是我尝试过但没有成功解决此问题的所有方法。
在此之前我成功运行了
dnf install runc
这是成功的并表明
Updating Subscription Management repositories.
Last metadata expiration check: 1:02:03 ago on Thu 09 Dec 2021 12:18:35 AM EST.
Package containerd.io-1.4.9-3.1.el8.x86_64 is already installed.
Dependencies resolved.
=================================================================================================================================================================================
Package Architecture Version Repository Size
=================================================================================================================================================================================
Upgrading:
containerd.io x86_64 1.4.12-3.1.el8 docker-ce-stable 28 M
Transaction Summary
=================================================================================================================================================================================
Upgrade 1 Package
Total download size: 28 M
Is this ok [y/N]: y
Downloading Packages:
containerd.io-1.4.12-3.1.el8.x86_64.rpm 30 MB/s | 28 MB 00:00
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 30 MB/s | 28 MB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: containerd.io-1.4.12-3.1.el8.x86_64 1/1
Upgrading : containerd.io-1.4.12-3.1.el8.x86_64 1/2
Running scriptlet: containerd.io-1.4.12-3.1.el8.x86_64 1/2
Running scriptlet: containerd.io-1.4.9-3.1.el8.x86_64 2/2
Cleanup : containerd.io-1.4.9-3.1.el8.x86_64 2/2
Running scriptlet: containerd.io-1.4.9-3.1.el8.x86_64 2/2
Verifying : containerd.io-1.4.12-3.1.el8.x86_64 1/2
Verifying : containerd.io-1.4.9-3.1.el8.x86_64 2/2
Installed products updated.
Last metadata expiration check: 1:02:27 ago on Thu 09 Dec 2021 12:18:35 AM EST.
Upgraded:
containerd.io-1.4.12-3.1.el8.x86_64
Complete!
这没有帮助,然后我跑了
yum update -y docker-ce
做了更新,但 dnf update -y 仍然有与你相同的错误,然后我跑了
dnf update -y docker-ce-cli
这也进行了更新,但仍然 dnf update -y 不起作用,更新是
Updating Subscription Management repositories.
Last metadata expiration check: 1:05:35 ago on Thu 09 Dec 2021 12:18:35 AM EST.
Dependencies resolved.
=================================================================================================================================================================================
Package Architecture Version Repository Size
=================================================================================================================================================================================
Upgrading:
docker-ce x86_64 3:20.10.11-3.el8 docker-ce-stable 22 M
Transaction Summary
=================================================================================================================================================================================
Upgrade 1 Package
Total download size: 22 M
Downloading Packages:
docker-ce-20.10.11-3.el8.x86_64.rpm 31 MB/s | 22 MB 00:00
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 30 MB/s | 22 MB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: docker-ce-3:20.10.11-3.el8.x86_64 1/1
Upgrading : docker-ce-3:20.10.11-3.el8.x86_64 1/2
Running scriptlet: docker-ce-3:20.10.11-3.el8.x86_64 1/2
Running scriptlet: docker-ce-3:20.10.8-3.el8.x86_64 2/2
Cleanup : docker-ce-3:20.10.8-3.el8.x86_64 2/2
Running scriptlet: docker-ce-3:20.10.8-3.el8.x86_64 2/2
Verifying : docker-ce-3:20.10.11-3.el8.x86_64 1/2
Verifying : docker-ce-3:20.10.8-3.el8.x86_64 2/2
Installed products updated.
Last metadata expiration check: 1:05:45 ago on Thu 09 Dec 2021 12:18:35 AM EST.
Upgraded:
docker-ce-3:20.10.11-3.el8.x86_64
Complete!
答案2
删除 podman 包并运行sudo yum autoremove
修复其未使用的依赖项为我解决了这个问题。