CentOS6.5 yum源无法使用问题 [Errno 14] PYCURL ERROR 22 - “The requested URL returned error: 404 Not Found“

CentOS6.5替换yun源及yum源无法使用问题

使用yum makecache的时候,报错如下:
http://mirrors.163.com/centos/6/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
原因是:
Centos6停止维护更新日期:2020年11月30日
Centos7停止维护更新日期:2024年6月
Centos8停止维护更新日期:2029年5月
2020年12月2日, centos官方停止了对 centos6的所有更新,并且下架了包括官方所有的 centos6源,目
前阿里、163、清华等 centos6源已无法使用

# 执行命令确定操作系统
lsb_release -a
## 输出
LSB Version:    :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: CentOS
Description:    CentOS release 6.5 (Final)
Release:        6.5
Codename:       Final
# 第一步
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.bak
# 第三步 拉取镜像
curl -o /etc/yum.repos.d/CentOS-Base.repo http://file.kangle.odata.cc/repo/Centos-6.repo
curl -o /etc/yum.repos.d/epel.repo http://file.kangle.odata.cc/repo/epel-6.repo
# 第四步 清除缓存  及 重新缓存
yum clean all && yum makecache

详细参考

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值