centos7下yum出现:已加载插件:fastestmirror Loading mirror speeds from cached hostfile 没有已启用的源。
出现这个问题是因为用mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup备份了一下源,莫名其妙就出错了。用yum repolist all查看源列表:显示全部禁用啥办法也不好使,只能更新国内镜像源,但是没有wget,可以用curl:命令:curl -o /etc/yum.repos.d/CentO
·
出现这个问题是因为用mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
备份了一下源,莫名其妙就出错了。
用yum repolist all
查看源列表:
显示全部禁用
啥办法也不好使,只能更新国内镜像源,但是没有wget,可以用curl:
命令:
curl -o /etc/yum.repos.d/CentOS-Base.repo 镜像源下载地址如http://mirrors.163.com/.help/CentOS7-Base-163.repo
下载的是网易镜像:自行查找http://mirrors.163.com/.help/centos.html
然后执行
yum clean all
yum makecache
成功
更多推荐
已为社区贡献1条内容
所有评论(0)