1、备份(针对所有CentOS可用,备份文件在当前路径下)

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

2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/

阿里云源

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

或者

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

网易云源

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo

3、之后运行yum makecache生成缓存

yum makecache

相关文章:

  • 2022-12-23
  • 2022-02-03
  • 2022-12-23
  • 2021-05-07
  • 2021-06-19
  • 2021-11-20
猜你喜欢
  • 2021-08-21
  • 2022-12-23
  • 2021-07-07
  • 2022-01-08
  • 2021-06-13
  • 2021-10-19
  • 2021-07-15
相关资源
相似解决方案