(已解决) centos6.5 yum源 失效 The whole CentOS 6 is dead and shouldn’t be used anywhere at all

借鉴 https://www.cnblogs.com/binbingg/p/14082610.html
借鉴 阿里:https://help.aliyun.com/document_detail/193569.htm

2020年11月30日CentOS 6 EOL。
CentOS 6操作系统版本结束了生命周期(EOL),Linux社区已不再维护该操作系统版本。
按照社区规则,CentOS 6的源地址http://mirror.centos.org/centos-6/内容已移除,目前第三方的镜像站中均已移除CentOS 6的源

The whole CentOS 6 is dead and shouldn’t be used anywhere at all 

↑报错说明当前源不再支持Centos6

解决办法1(阿里):

!!!!重要说明

说明 本文主要说明ECS实例中的相关操作与配置。如果您的服务器不是ECS实例,需保证服务器具有公网访问能力,并且源地址http://mirrors.cloud.aliyuncs.com需要替换为http://mirrors.aliyun.com。
例如,切换yum源为http://mirrors.aliyun.com/centos-vault/6.10/;切换epel源为http://mirrors.aliyun.com/epel-archive/6/。

运行以下命令编辑CentOS-Base.repo 文件。

vim /etc/yum.repos.d/CentOS-Base.repo 

按i进入编辑模式,修改以下内容切换源。
请根据实例不同的网络类型进行修改,具体内容如下:
专有网络VPC类型实例

[base]
name=CentOS-6.10
enabled=1
failovermethod=priority
baseurl=http://mirrors.cloud.aliyuncs.com/centos-vault/6.10/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.cloud.aliyuncs.com/centos-vault/RPM-GPG-KEY-CentOS-6

[updates]
name=CentOS-6.10
enabled=1
failovermethod=priority
baseurl=http://mirrors.cloud.aliyuncs.com/centos-vault/6.10/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.cloud.aliyuncs.com/centos-vault/RPM-GPG-KEY-CentOS-6

[extras]
name=CentOS-6.10
enabled=1
failovermethod=priority
baseurl=http://mirrors.cloud.aliyuncs.com/centos-vault/6.10/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.cloud.aliyuncs.com/centos-vault/RPM-GPG-KEY-CentOS-6

经典网络类型实例

[base]
name=CentOS-6.10
enabled=1
failovermethod=priority
baseurl=http://mirrors.aliyuncs.com/centos-vault/6.10/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyuncs.com/centos-vault/RPM-GPG-KEY-CentOS-6

[updates]
name=CentOS-6.10
enabled=1
failovermethod=priority
baseurl=http://mirrors.aliyuncs.com/centos-vault/6.10/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyuncs.comm/centos-vault/RPM-GPG-KEY-CentOS-6

[extras]
name=CentOS-6.10
enabled=1
failovermethod=priority
baseurl=http://mirrors.aliyuncs.com/centos-vault/6.10/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyuncs.com/centos-vault/RPM-GPG-KEY-CentOS-6

编辑完成后,按Esc键,并输入:wq保存退出文件。

运行以下命令编辑epel.repo 文件。

vim /etc/yum.repos.d/epel.repo

按i进入编辑模式,修改以下内容切换源。
请根据实例不同的网络类型进行修改,具体内容如下:
专有网络VPC类型实例

[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
enabled=1
failovermethod=priority
baseurl=http://mirrors.cloud.aliyuncs.com/epel-archive/6/$basearch
gpgcheck=0
gpgkey=http://mirrors.cloud.aliyuncs.com/epel-archive/RPM-GPG-KEY-EPEL-6

经典网络类型实例

[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
enabled=1
failovermethod=priority
baseurl=http://mirrors.aliyuncs.com/epel-archive/6/$basearch
gpgcheck=0
gpgkey=http://mirrors.aliyuncs.com/epel-archive/RPM-GPG-KEY-EPEL-6

编辑完成后,按Esc键,并输入:wq保存退出文件。

yum clean all
yum makecache

切换完成后,您可以使用yum install命令安装需要的软件包。

解决方案2:

把CentOS-Base.repo 里面的东西全部删掉,添加如下内容即可。

[base]
name=CentOS-6
failovermethod=priority
baseurl=https://vault.centos.org/6.9/os/x86_64/
gpgcheck=0

yum clean all
yum makecache

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

石宗昊

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值