CentOS 6.8安装Docker的问题【No package docker-io available.】

在安装软件时有如下提示:

[root@localhost ~]# yum install -y docker-io
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.163.com
 * epel: mirrors.yun-idc.com
 * extras: mirrors.aliyun.com
 * updates: mirror.bit.edu.cn
No package docker-io available.
Error: Nothing to do

问题原因:yum源问题,需要更改yum源。

解决方法:

移除原有yum源:

[root@localhost ~]# cd /etc/yum.repos.d
[root@localhost yum.repos.d]# ls
CentOS-Base.repo       CentOS-fasttrack.repo  CentOS-Vault.repo  epel-testing.repo
CentOS-Debuginfo.repo  CentOS-Media.repo      epel.repo
[root@localhost yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.bak
更新yum源

[root@localhost yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
--2019-12-21 12:57:47--  http://mirrors.163.com/.help/CentOS6-Base-163.repo
Resolving mirrors.163.com... 59.111.0.251
Connecting to mirrors.163.com|59.111.0.251|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2006 (2.0K) [application/octet-stream]
Saving to: “CentOS6-Base-163.repo”

100%[==========================================>] 2,006       --.-K/s   in 0s      

2019-12-21 12:57:47 (10.9 MB/s) - “CentOS6-Base-163.repo” saved [2006/2006]

将163yum源设置为新的默认yum源

[root@localhost yum.repos.d]# mv CentOS6-Base-163.repo CentOS-Base.repo

清理

[root@localhost yum.repos.d]# yum clean all
Loaded plugins: fastestmirror, refresh-packagekit, security
Cleaning repos: base epel extras updates
Cleaning up Everything
Cleaning up list of fastest mirrors

 

安装engine即可解决

yum install https://get.docker.com/rpm/1.7.1/centos-6/RPMS/x86_64/docker-engine-1.7.1-1.el6.x86_64.rpm

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值