MENU

记录下:docker安装报错: Problem: problem with installed package containers-common-2:1-2.module_el8.5.0+890+6b136101.noarch

November 28, 2022 •

使用 yum install -y docker-ce 安装docker报错
报错如下:

Last metadata expiration check: 0:26:13 ago on Mon 28 Nov 2022 10:55:32 AM CST.
Error: 
 Problem: problem with installed package containers-common-2:1-2.module_el8.5.0+890+6b136101.noarch
  - package containers-common-2:1-2.module_el8.5.0+890+6b136101.noarch requires runc, but none of the providers can be installed
  - package containerd.io-1.6.10-3.1.el8.x86_64 conflicts with runc provided by runc-1.0.2-1.module_el8.5.0+911+f19012f9.x86_64
  - package containerd.io-1.6.10-3.1.el8.x86_64 obsoletes runc provided by runc-1.0.2-1.module_el8.5.0+911+f19012f9.x86_64
  - cannot install the best candidate for the job
  - 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-66.rc10.module_el8.5.0+1004+c00a74f5.x86_64 is filtered out by modular filtering
  - package runc-1.0.0-72.rc92.module_el8.5.0+1006+8d0e68a2.x86_64 is filtered out by modular filtering
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

网上一顿查找,有的说是系统安装了其他容器,并且系统允许存在一个容器。需要删除已存在的容器后即可安装docker。查看了下,系统中确实存在podman 这个容器,使用 yum -y erase podman buildah 删除后,安装docker仍然报错。
正在我准备放弃的时候,发现有网友出现和我一摸一样的报错。他的解决办法是安装了其他版本的docker,并不是使用系统dnf中docker。我尝试了下,可以解决此问题。

yum install https://download.docker.com/linux/centos/8/x86_64/stable/Packages/containerd.io-1.4.3-3.1.el8.x86_64.rpm --allowerasing

然后重新执行 yum install -y docker-ce