【VMware】CentOS6.5 Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds

最近在用Centos 6.5 的时候出现了这种情况,

[root@bogon Desktop]# yum -y install docker
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
	* base: mirrors.aliyun.com
	* extras: mirrors.nwsuaf.edu.cn
	* updates: mirrors.huaweicloud.com
http://mirrors.aliyun.com/centos/6.8/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.aliyun.com'"
Trying other mirror.
http://centos.ustc.edu.cn/centos/6.8/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
http://mirrors.neusoft.edu.cn/centos/6.8/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.neusoft.edu.cn'"
Trying other mirror.

遇到这种情况有两种做法:

1、没网,试着:ping www.baidu.com
如果显示没有连接的话,就说明没网,也就无法使用yum 命令。
2、ping通了的话,还是是用不了yum命令,说明是yum镜像没有了,那么就得下载一个来更新。

在安装完CentOS后一般需要修改yum源,才能够在安装更新rpm包时获得比较理想的速度。
国内比较快的有163源、sohu源。这里以163源为例子。

# cd /etc/yum.repos.d

# mv CentOS-Base.repo CentOS-Base.repo.backup

# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

# mv CentOS6-Base-163.repo CentOS-Base.repo

# yum clean all

最后在使用yum 就可以了

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值