docker初次安装排错

错误提示一

Transaction Check Error:
file /usr/bin/docker from install of docker-io-1.7.1-2.el6.x86_64 conflicts with file from package docker-1.5-5.el6.x86_64

这个是因为先装了docker,再装docker-io后的结果

解决办法:

卸载方式如:
Uninstall old versions

# 先卸载
yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-selinux \
                  docker-engine-selinux \
                  docker-engine
# 然后安装 docker-io
yum install docker-io

错误提示二

Fehler: docker-ce conflicts with 2:docker-1.13.1-75.git8633870.el7.centos.x86_64
Fehler: docker-ce-cli conflicts with 2:docker-1.13.1-75.git8633870.el7.centos.x86_64

这个是因为主机上已经有旧版docker,所有docker-ce才无法被安装

解决办法:

卸载方式如:
Uninstall old versions

# 开始卸载
yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-selinux \
                  docker-engine-selinux \
                  docker-engine
# 卸载完毕后,进行安装
yum install docker-ce
# 安装完毕后启动
systemctl start docker
# 查看docker版本
docker --version

你可能感兴趣的:(docker初次安装排错)