centos本地源,(已解決) centos6.5 yum源 失效 The whole CentOS 6 is dead and shouldn’t be us

 2023-11-30 阅读 22 评论 0

摘要:借鑒 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社區已不再維護該操作系統版本。 按照社區

借鑒 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本地源,運行以下命令編輯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

yum centos、經典網絡類型實例

[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

版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。

原文链接:https://hbdhgg.com/4/186089.html

发表评论:

本站为非赢利网站,部分文章来源或改编自互联网及其他公众平台,主要目的在于分享信息,版权归原作者所有,内容仅供读者参考,如有侵权请联系我们删除!

Copyright © 2022 匯編語言學習筆記 Inc. 保留所有权利。

底部版权信息