CentOS 6已經隨着2020年11月的結束進入了EOL(Reaches End of Life),官方便在12月2日正式將CentOS 6相關的軟件源移出了官方源,隨之而來逐級鏡像也會陸續將其刪除。
1、先把fastestmirror關了,這個插件默認會尋找離你最近的鏡像站去訪問
vi /etc/yum/pluginconf.d/fastestmirror.conf #修改 enable=0
2、把系統中原來的源進行備份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
3、下載repo文件
wget -O /etc/yum.repos.d/CentOS-Base.repo https://static.lty.fun/%E5%85%B6%E4%BB%96%E8%B5%84%E6%BA%90/SourcesList/Centos-6-Vault-Aliyun.repo
4、生成緩存
yum clean all yum makecache