我的开发机器是 CentOS 8 VM,我正在尝试在其上安装 docker,以便可以在本地创建 docker 映像。我基本上遵循这里的 docker 教程:https://docs.docker.com/engine/install/centos/
我添加了docker repo,但需要禁用一些包,因为存在冲突。但现在我卡在这部分:
$ sudo yum install docker-ce docker-ce-cli containerd.io
出现以下错误消息:
Running transaction check
No available modular metadata for modular package 'container-selinux-2:2.155.0-1.module_el8.3.0+699+d61d9c41.noarch', it cannot be installed on the system
No available modular metadata for modular package 'fuse-overlayfs-1.3.0-2.module_el8.3.0+699+d61d9c41.x86_64', it cannot be installed on the system
No available modular metadata for modular package 'libslirp-4.3.1-1.module_el8.3.0+475+c50ce30b.x86_64', it cannot be installed on the system
No available modular metadata for modular package 'slirp4netns-1.1.8-1.module_el8.3.0+699+d61d9c41.x86_64', it cannot be installed on the system
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'yum clean packages'.
Error: No available modular metadata for modular package
我尝试过$ sudo dnf clean all
,但$ sudo yum clean packages
无济于事。
我不太熟悉 yum 和 CentOS,所以我可能遗漏了一些琐碎的东西。
答案1
好的,问题在于我已禁用container-tools
。sudo dnf -y module enable container-tools
因为当我尝试安装docker时,它会产生版本冲突的问题。我不得不重新启用container-tools
,然后使用关键的docker软件包进行安装,sudo dnf install docker-ce --nobest
这里是使用--nobest
忽略某些冲突的选项。