运行以下命令
yum clean metadata yum clean all yum update
若无效 将/etc/yum.repos.d/目录下除了CentOS-Base.repo的所有文件删除,然后再运行以上命令。
/etc/yum.repos.d/
CentOS-Base.repo