在centos7安装docker时遇到的Error downloading packages
发现服务器上面安装的docke太旧了,就想升级一下docke版本首先,先卸载旧的版本1,查询安装过的包yum list installed | grep dockerdocker-engine.x86_6417.03.0.ce-1.el7.centos@dockerrepo2,删除安装的软件包yum -y remove docker-eng...
·
发现服务器上面安装的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
更多推荐
已为社区贡献3条内容
所有评论(0)