本文主要是介绍(centos6停止更新)无法使用yum解决办法,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
问题:
今天用yum安装telnet命令提示找不到镜像地址:
查了资料发现官方便在2020年12月2日正式将CentOS 6相关的软件源移出了官方源,随之而来逐级镜像也会陆续将其删除
:
报错信息:
Loaded plugins: fastestmirror, security
Setting up Install Process
Determining fastest mirrors
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base
解决办法:
1首先把fastestmirrors关了,fastestmirror是yum的一个加速插件 enable=0禁用
#编辑 vi /etc/yum/pluginconf.d/fastestmirror.conf #修改 enable=0 #或者执行以下命令
sed -i "s|enabled=1|enabled=0|g" /etc/yum/pluginconf.d/fastestmirror.conf
2,备份 CentOS-Base.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
3.下载阿里云Vault镜像(国内服务器用)或官方Vault源(海外服务器用)
官方Vault源(海外服务器用)
curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Official.repo
或者替换为阿里云Vault镜像(国内服务器用)
curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo
4.重新安装试试,正常
这篇关于(centos6停止更新)无法使用yum解决办法的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!