新闻公告使用手机扫一扫查看
< 返回

centos6.x无法使用yum源解决方法

2022-03-07 13:43 作者:昊瑞网络 阅读量:5232

1、关闭fastestmirror

vi /etc/yum/pluginconf.d/fastestmirror.conf

#修改参数

enable=0

2、将原来的源改名

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

3、更换源

#替换为官方Vault源

wget -O /etc/yum.repos.d/CentOS-Base.repo https://static.lty.fun/%E5%85%B6%E4%BB%96%E8%B5%84%E6%BA%90/SourcesList/Centos-6-Vault-Official.repo

#替换为阿里云Vault镜像

wget -O /etc/yum.repos.d/CentOS-Base.repo https://static.lty.fun/%E5%85%B6%E4%BB%96%E8%B5%84%E6%BA%90/SourcesList/Centos-6-Vault-Aliyun.repo

4.清理yum缓存,并生成新的缓存

yum clean all && yum makecache

联系我们
返回顶部