rm -f /etc/yum.repos.d/*

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

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

yum clean all
yum makecache

如果报错:http://mirrors.aliyun.com/centos/7Server/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found

则修改CentOS-Base.repo文件,把里面的$releasever改为7

 

相关文章:

  • 2021-12-15
  • 2021-12-06
  • 2022-02-03
  • 2022-12-23
  • 2021-10-25
  • 2021-11-15
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
  • 2022-12-23
  • 2021-05-23
  • 2021-12-21
  • 2021-05-29
相关资源
相似解决方案