用户工具

站点工具


pwstudio:qa:q102

q102 rocky 8.10 安装 docker 报错

symptom 现象

在 Rocky 8.10 系统上,按照文档执行安装 Docker 的命令时,如果看到类似下面这样一大段报错(提示 podman 相关的包和 runc 冲突):

[lxkt@localhost ~]$ sudo dnf install -y docker-ce docker-ce-cli containerd.io
Last metadata expiration check: 0:00:32 ago on Thu 02 Jul 2026 02:28:26 PM CST.
Error:
 Problem 1: problem with installed package podman-4:4.9.4-1.module+el8.10.0+1815+5fe7415e.x86_64
  - package podman-4:4.9.4-1.module+el8.10.0+1815+5fe7415e.x86_64 from @System requires runc >= 1.0.0-57, but none of the providers can be installed
  - package podman-4:4.9.4-1.module+el8.10.0+1815+5fe7415e.x86_64 from appstream requires runc >= 1.0.0-57, but none of the providers can be installed
  - package podman-4:4.9.4-1.module+el8.10.0+1825+623b0c20.x86_64 from appstream requires runc >= 1.0.0-57, but none of the providers can be installed
  - package podman-4:4.9.4-12.module+el8.10.0+1843+6892ab28.x86_64 from appstream requires runc >= 1.0.0-57, but none of the providers can be installed
  - package podman-4:4.9.4-13.module+el8.10.0+1871+e6fa1069.x86_64 from appstream requires runc >= 1.0.0-57, but none of the providers can be installed
  - package podman-4:4.9.4-13.module+el8.10.0+1874+ce489889.x86_64 from appstream requires runc >= 1.0.0-57, but none of the providers can be installed
  - package podman-4:4.9.4-15.module+el8.10.0+1880+8e896d1b.x86_64 from appstream requires runc >= 1.0.0-57, but none of the providers can be installed
  - package podman-4:4.9.4-18.module+el8.10.0+1896+b18fa106.x86_64 from appstream requires runc >= 1.0.0-57, but none of the providers can be installed
  - package podman-4:4.9.4-19.module+el8.10.0+1933+1fc610b1.x86_64 from appstream requires runc >= 1.0.0-57, but none of the providers can be installed
  - package podman-4:4.9.4-20.module+el8.10.0+1948+4b5cd4a9.x86_64 from appstream requires runc >= 1.0.0-57, but none of the providers can be installed
  - package podman-4:4.9.4-20.module+el8.10.0+2001+6a33db9f.x86_64 from appstream requires runc >= 1.0.0-57, but none of the providers can be installed
  - package podman-4:4.9.4-22.module+el8.10.0+2006+320bb1e5.x86_64 from appstream requires runc >= 1.0.0-57, but none of the providers can be installed
  - package podman-4:4.9.4-23.module+el8.10.0+2064+309a12a4.x86_64 from appstream requires runc >= 1.0.0-57, but none of the providers can be installed
  - package podman-4:4.9.4-25.module+el8.10.0+40047+0c0a73f4.x86_64 from appstream requires runc >= 1.0.0-57, but none of the providers can be installed
  - package podman-4:4.9.4-26.module+el8.10.0+40066+670062d8.x86_64 from appstream requires runc >= 1.0.0-57, but none of the providers can be installed
  - package podman-4:4.9.4-27.module+el8.10.0+40068+51711525.x86_64 from appstream requires runc >= 1.0.0-57, but none of the providers can be installed
  - package podman-4:4.9.4-28.module+el8.10.0+40087+cfe9c127.x86_64 from appstream requires runc >= 1.0.0-57, but none of the providers can be installed
  - package podman-4:4.9.4-3.module+el8.10.0+1829+9bb2696f.x86_64 from appstream requires runc >= 1.0.0-57, but none of the providers can be installed
  - package podman-4:4.9.4-30.module+el8.10.0+40133+32c21f88.x86_64 from appstream requires runc >= 1.0.0-57, but none of the providers can be installed

(不需要逐字看懂这一大段,只要看到关键字 podmanrunc 出现在报错里,基本就能确定是本篇说的这个问题)

另外注意一下,上面示例里命令提示符是 [lxkt@localhost ~]$,这里的 lxkt 只是这台示例机器上的登录用户名,不是什么特殊命令,你自己机器上提示符里的用户名很可能是别的名字,这都是正常的,跟报错本身无关。

原因

系统中已经安装了 Podman(它依赖 runc),与正在尝试安装 Docker(它也包含自己的 runc),两者发生了冲突。

解决方案

依次执行下面三条命令(建议整段复制粘贴):

# 移除 Podman 及其依赖
sudo dnf remove -y podman podman-* buildah skopeo
 
# 清理可能残留的 runc 冲突
sudo dnf remove -y runc
 
# 重新安装 Docker
sudo dnf install -y docker-ce docker-ce-cli containerd.io

执行完第三条命令后,如果不再出现前面的报错,说明问题已经解决,可以回到安装文档继续下一步(启动 Docker 服务)。

pwstudio/qa/q102.txt · 最后更改: 2026/07/28 03:17 由 127.0.0.1