Loading mirror speeds from cached hostfile

在使用yum安装软件时出现的错误信息如下:

[root@localhost ~]# yum install bind* -y
已加载插件:fastestmirror, refresh-packagekit, security
设置安装进程 Loading mirror speeds from cached
hostfile

先ping下外网是否能通:

[root@localhost ~]#  ping www.baidu.com

如果通的话用下面的方法就可以解决

修改yum源,在安装更新rpm包时获得比较理想的速度。国内比较快的有163源、sohu源。这里以163源为例子。

[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.backup
[root@localhost yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
[root@localhost yum.repos.d]# mv CentOS6-Base-163.repo CentOS-Base.repo
[root@localhost yum.repos.d]# yum clean all

最后在使用yum就可以了。

发布了56 篇原创文章 · 获赞 50 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/weixin_43883625/article/details/103754992