1)cd /etc/yum.repos.d/
2)wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo //根据自己的版本去更改源
// centos 7 wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
3)yum clean all
4)yum makecache

 posted on 2022-11-12 14:36    阅读(5)  评论(0编辑  收藏  举报