在redhat中安装Docker CE

问题描述 投票:2回答:1

我试图在我的系统中安装Docker CE,结果有些问题。

我做了以下步骤:

  1. sudo yum install -y yum-utils - 没有错误
  2. sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo - 没有错误
  3. sudo yum makecache fast - 没有错误
  4. sudo yum -y install docker-ce - 失败,错误

错误:包:docker-ce-17.06.0.ce-1.el7.centos.x86_64(docker-ce-stable)需要:container-selinux> = 2.9


yum可以配置为尝试通过临时启用禁用的repos和搜索缺少的依赖项来解决此类错误。要启用此功能,请在/etc/yum/pluginconf.d/search-disabled-repos.conf中设置'notify_only = 0'


错误:包:docker-ce-17.06.0.ce-1.el7.centos.x86_64(docker-ce-stable)需要:container-selinux> = 2.9您可以尝试使用--skip-broken来解决问题

有人可以帮我吗?

docker kubernetes
1个回答
1
投票

container-selinux包可从rhel-7-server-extras-rpms频道获得。您可以使用以下方法启用它

subscription-manager repos --enable=rhel-7-server-extras-rpms

但是,如果您没有任何Enterprise Linux订阅,则可以使用CentOS Extra repo作为解决方法。将以下内容添加到/etc/yum.repos.d/centos.repo

[CentOS-extras]
name=CentOS-7-Extras
mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
© www.soinside.com 2019 - 2024. All rights reserved.