免费开源共享资源平台
Centos 6无法使用yum解决办法
作者:熊猫畔日期:2020-12-04 11:33:29分类:技术教程
12月后Centos 6 系统无法使用yum出现错误(文章底部看)
相信已经有一部分朋友今天连接到CentOS 6的服务器后执行yum后发现报错,那么发生了什么?
CentOS 6已经随着2020年11月的结束进入了EOL(Reaches End of Life),不过有一些老设备依然需要支持,CentOS官方也给这些还不想把CentOS 6扔进垃圾堆的用户保留了最后一个版本的镜像,只是这个镜像不会再有更新了
官方便在12月2日正式将CentOS 6相关的软件源移出了官方源,随之而来逐级镜像也会陆续将其删除。
不过有一些老设备依然需要维持在当前系统,CentOS官方也给这些还不想把CentOS 6扔进垃圾堆的用户保留了各个版本软件源的镜像,只是这个软件源不会再有更新了。
一键修复
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 #或者执行以下命令 sed -i "s|enabled=1|enabled=0|g" /etc/yum/pluginconf.d/fastestmirror.conf
先把之前的repo挪到备份,然后下面两个二选一
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
替换为官方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
下列是错误详情
[root@c8-20 ~]# yum makecache Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile 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
或者
[root@li496-237 ~]# yum -y install unzip zip Loaded plugins: fastestmirror 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/ YumRepo Error: All mirror URLs are not using ftp, http[s] or file. Eg. Invalid release/repo/arch combination/ YumRepo Error: All mirror URLs are not using ftp, http[s] or file. Eg. Invalid release/repo/arch combination/ http://mirrors.linode.com/centos/6/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" Trying other mirror. To address this issue please refer to the below knowledge base article https://access.redhat.com/articles/1320623 If above article doesn't help to resolve this issue please open a ticket with Red Hat Support. Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
猜你还喜欢
- 01-17 火绒针对TX QQ/TIM读取隐私等的解决方案
- 01-16 Android 隐私保护管理器-XPrivacyLua v1.27+XPrivacyLuaPro v0.76
- 01-16 前拼多多员工发布《我在拼多多的三年》一文
- 01-16 Caps Writer电脑端语音输入工具语音识别上屏
- 01-15 360压缩国际版清爽干净简约
- 01-15 Android 网络信号大师最新版
- 01-15 Android 自动精灵 V2.13.1 支持脚本录制免ROOT
- 01-14 严重警告!大规模爆发incaseformat蠕虫,20秒内删除用户文件
- 01-14 红旗 Linux 桌面系统发布 v11 预览版
- 01-14 Smart AppLock 7.7.8 手机应用加密软件专业版
- 01-14 Via V4.1.2 一款简单而强大的浏览器
- 01-13 167G写真准备好你的硬盘来自某图站全站打包
取消回复欢迎 你 发表评论:
- 热评文章
- 热门tag
已有56位网友发表了看法:
HGerhardt 评论于 [2020-12-10 00:21:43] 回复
谢谢
大师 评论于 [2020-12-10 02:30:51] 回复
网上啥改DNS。改国内源。改桥接模式。都是狗屁方法。只有你的方法是正确的。一键解决。谢谢。
朝思暮想 评论于 [2020-12-10 09:23:16] 回复
谢谢
朝思暮想 评论于 [2020-12-10 09:23:33] 回复
一下就能用了
不矫情 评论于 [2020-12-10 10:56:09] 回复
感谢分享。
徐望春 评论于 [2020-12-10 12:11:09] 回复
感谢分享。
徐望春 评论于 [2020-12-10 12:11:28] 回复
一下就能用了
徐望春 评论于 [2020-12-10 12:12:00] 回复
谢谢你的技术方案
mm 评论于 [2020-12-10 13:37:38] 回复
111
649089755 评论于 [2020-12-10 14:25:09] 回复
111
xcb 评论于 [2020-12-10 14:35:06] 回复
1111
笔影 评论于 [2020-12-10 15:29:26] 回复
谢谢技术分享
123 评论于 [2020-12-10 16:15:09] 回复
123
12345 评论于 [2020-12-10 17:07:12] 回复
谢谢大佬
jack 评论于 [2020-12-10 18:30:29] 回复
谢谢大佬
蒙雨周 评论于 [2020-12-10 19:25:24] 回复
谢谢大佬
腾讯视频 评论于 [2020-12-10 19:36:36] 回复
谢谢大佬
自由如风 评论于 [2020-12-10 19:55:40] 回复
谢谢大佬
天上的一颗星星 评论于 [2020-12-10 20:54:17] 回复
nice
天上的一颗星星 评论于 [2020-12-10 21:13:16] 回复
我又来了。。。。
a 评论于 [2020-12-10 22:38:33] 回复
haohao
哇咔 评论于 [2020-12-11 09:51:22] 回复
nice
zhy 评论于 [2020-12-11 09:51:38] 回复
谢谢谢谢
bc 评论于 [2020-12-11 10:51:45] 回复
111111
DEER 评论于 [2020-12-11 14:27:11] 回复
111
noError 评论于 [2020-12-11 15:39:40] 回复
谢谢分享
四爷 评论于 [2020-12-11 15:49:41] 回复
谢谢分享
Hunter 评论于 [2020-12-11 15:58:51] 回复
谢谢
艰苦奋斗 评论于 [2020-12-11 15:59:10] 回复
谢谢分享
水晶 评论于 [2020-12-11 15:59:15] 回复
hh
c. 评论于 [2020-12-11 16:00:24] 回复
谢谢
夏至己尽 评论于 [2020-12-11 16:06:27] 回复
谢谢
1D 评论于 [2020-12-11 16:08:26] 回复
xiexie
时好时 评论于 [2020-12-11 16:14:14] 回复
谢谢
99_x134 评论于 [2020-12-11 16:54:56] 回复
谢谢分享
青青子衿 评论于 [2020-12-11 17:29:34] 回复
来了
dd 评论于 [2020-12-11 17:55:12] 回复
谢谢分享
qq 评论于 [2020-12-11 18:04:46] 回复
谢谢
22222 评论于 [2020-12-11 23:03:19] 回复
2222dfaffffffffff
22222 评论于 [2020-12-11 23:03:38] 回复
谢谢大佬
King 评论于 [2020-12-11 23:25:22] 回复
感谢大佬
四两剥千金 评论于 [2020-12-12 20:12:58] 回复
谢谢分享。
鹏鹏 评论于 [2020-12-12 22:47:26] 回复
111
Hikari 评论于 [2020-12-15 14:25:16] 回复
谢谢分享
大佬厉害 评论于 [2020-12-16 06:04:49] 回复
大佬牛逼
牛批@qq.com 评论于 [2020-12-17 17:28:11] 回复
牛批~
可乐加些冰 评论于 [2020-12-18 21:33:13] 回复
感谢!
4mae 评论于 [2020-12-19 14:05:26] 回复
谢谢!!!!!!!!!!
pda.4 评论于 [2020-12-21 16:12:08] 回复
谢谢
Magina 评论于 [2020-12-23 18:43:46] 回复
感谢
凉白开 评论于 [2020-12-23 23:09:39] 回复
感谢,终于解决了
yiowoc 评论于 [2020-12-30 18:21:10] 回复
感谢大佬
Kaka 评论于 [2020-12-31 15:09:47] 回复
感谢大佬
风云 评论于 [2021-01-03 16:53:24] 回复
大佬,请收下我的膝盖
风云 评论于 [2021-01-03 16:54:37] 回复
搞了2个小时,只有你这里 一键解决 ,大佬。。。膜拜中。。。
小李飞刀 评论于 [2021-01-06 14:40:51] 回复
谢谢!!!