在centos7安装docker时遇到的Error downloading packages

发现服务器上面安装的docke太旧了,就想升级一下docke版本

首先,先卸载旧的版本

1,查询安装过的包

yum list installed | grep docker

docker-engine.x86_64                 17.03.0.ce-1.el7.centos         @dockerrepo

2,删除安装的软件包

yum -y remove docker-engine.x86_64

3,删除镜像/容器等

rm -rf /var/lib/docker

然后,使用快速安装脚本进行安装

curl -sSL https://get.daocloud.io/docker | sh

可是安装失败了,又试了阿里云的快速安装脚本也不行

试了各种办法,都不行,后来发现打印的日志

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.



Error downloading packages:
  docker-engine-17.05.0.ce-1.el7.centos.x86_64: [Errno 256] No more mirrors to try.

发现是docker-engine-17.05.0.ce-1.el7.centos.x86_64这个rpm包下载不下来,到http://mirrors.aliyun.com/docker-engine/yum/repo/main/centos/7/Packages/ 仓库看了下,发现阿里云根本就没有这个包。

所以旧智能手动下载,手动安装了

[root@localhost ~]# wget http://mirrors.aliyun.com/docker-engine/yum/repo/main/centos/7/Packages/docker-engine-17.03.0.ce-1.el7.centos.x86_64.rpm
--2018-04-02 15:18:21--  http://mirrors.aliyun.com/docker-engine/yum/repo/main/centos/7/Packages/docker-engine-17.03.0.ce-1.el7.centos.x86_64.rpm
正在解析主机 mirrors.aliyun.com (mirrors.aliyun.com)... 183.61.180.191, 183.61.180.182, 183.61.241.239, ...
正在连接 mirrors.aliyun.com (mirrors.aliyun.com)|183.61.180.191|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:19520780 (19M) [application/x-redhat-package-manager]
正在保存至: docker-engine-17.03.0.ce-1.el7.centos.x86_64.rpm

手动安装

[root@localhost ~]# yum install docker-engine-17.03.0.ce-1.el7.centos.x86_64.rpm 
已加载插件:fastestmirror
正在检查 docker-engine-17.03.0.ce-1.el7.centos.x86_64.rpm: docker-engine-17.03.0.ce-1.el7.centos.x86_64
docker-engine-17.03.0.ce-1.el7.centos.x86_64.rpm 将被安装

验证成功

[root@localhost ~]# docker --version
Docker version 17.03.0-ce, build 60ccb22
  • 8
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值