具體在使用yum安裝wget的時候,報了如下的錯誤

原因:centos6的預設源在2012年-12月左右被官方搞掉了
第一種方法:一鍵修複(一條一條執行即可):
一般執行了前3條指令就好了
sed -i "s|enabled=1|enabled=0|g" /etc/yum/pluginconf.d/fastestmirror.conf
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo
yum clean all
yum makecache
第二種方法:手動修複教程:
首先把fastestmirrors關了
vi /etc/yum/pluginconf.d/fastestmirror.conf
enable=0
先把之前的repo挪到備份,然後下面兩個二選一
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Official.repo
curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo