一、参考阿里巴巴开源镜像站切换更新前先备份执行mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup下载新的 CentOS-Base.repo 到 /etc/yum.repos.d/我这里是centos7的所以执行wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo运行yum makecache生成缓存yum makecache然后yum更新yum update完成