安装Docker时出现yum安装错误

3
CentOS version:  lsb_release -d
Description:    CentOS release 6.5 (Final)

我的仓库看起来像这样。
cat /etc/yum.repos.d/docker.repo 
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg

我有一些旧版本的Docker,试图安装时遇到错误。即使我选择跳过选项,在我的CentOS上Docker服务也不存在。yum install docker-engine出现以下问题:

Processing Conflict: docker-engine-1.7.1-1.el6.x86_64 conflicts docker-io
--> Finished Dependency Resolution
Error: docker-engine conflicts with docker-io-0.6.2-1.el6.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest"

当我尝试启动它时,service docker start不存在。

我该如何清除所有docker相关内容并从头开始?

1个回答

1

Docker的官方版本不再支持RHEL/Centos 6。我认为这在1.7.1版本停止了,官方版本现在是1.10。我建议升级到Centos 7或任何具有3.10+内核的系统,以使用最新的docker-engine,因为它已经有了很大的改进。

如果你被困在Centos 6.5上,那么要么继续使用EPEL docker-io软件包,要么安装1.7.1 rpm

完全删除Centos 6软件包。

yum remove docker-io

删除所有 Docker 数据(并且永远无法恢复!)

rm -rf /var/lib/docker

删除Docker仓库配置

rm /etc/yum.repos.d/docker.repo

安装docker-io,再次尝试。

yum install docker-io

或者安装{{link1:docker-engine-1.7.1 rpm}}。

yum install http://yum.dockerproject.org/repo/main/centos/6/Packages/docker-engine-1.7.1-1.el6.x86_64.rpm

启动它和Docker

service docker start
docker run hello-world

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接