当前位置: 代码迷 >> 综合 >> 如何解决错误:包:docker-ce-18.06.1.ce-3.el7.x86_64(docker-ce-stable)需要:container-selinux = 2.9
  详细解决方案

如何解决错误:包:docker-ce-18.06.1.ce-3.el7.x86_64(docker-ce-stable)需要:container-selinux = 2.9

热度:88   发布时间:2023-11-02 14:51:19.0

在Centos 7上安装Docker-ce时遇到过这样的错误吗?
在这里插入图片描述
那么,解决它的最简单方法是安装container-selinux包。要执行此操作,请转至官方Centos Mirror,http://mirror.centos.org/centos/7/extras/x86_64/Packages/并查找最新的软件包。正是container-selinux-2.68-1.el7.noarch.rpm在撰写本文时。获得后,复制其链接地址(url),前往要安装docker的服务器的终端并运行:
yum -y install yum -y install http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.68-1.el7.noarch.rpm
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
No package install available.
container-selinux-2.68-1.el7.noarch.rpm | 36 kB 00:00:00
Examining /var/tmp/yum-root-_B6oDB/container-selinux-2.68-1.el7.noarch.rpm: 2:container-selinux-2.68-1.el7.noarch
Marking /var/tmp/yum-root-_B6oDB/container-selinux-2.68-1.el7.noarch.rpm to be installed
Resolving Dependencies
–> Running transaction check
—> Package container-selinux.noarch 2:2.68-1.el7 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================
Package Arch Version Repository Size

Installing:
container-selinux noarch 2:2.68-1.el7 /container-selinux-2.68-1.el7.noarch 36 k

Transaction Summary

Install 1 Package

Total size: 36 k
Installed size: 36 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 2:container-selinux-2.68-1.el7.noarch 1/1
Verifying : 2:container-selinux-2.68-1.el7.noarch 1/1

Installed:
container-selinux.noarch 2:2.68-1.el7

Complete!

在此之后,继续安装 docker-ce
systemctl enable docker && systemctl start docker

  相关解决方案