一、背景
继 CentOS 8 停维后 CentOS 7 也将停止维护!
CentOS 8 2021年底停止维护,CentOS 6 2020年底停止维护,CentOS 7 也已于 2020 年底结束整体性更新,暂定计划于 2024 年 6 月底结束维护性更新,CentOS 全系即将迎来生命的终点。
CentOS 停服后我们可以考虑使用免费的 CentOS Stream 或使用收费的 RHEL
如果不担心数据安全、系统 BUG 无人修复等问题也可以继续使用 CentOS 旧版(不推荐)
当然也可以更大胆一些直接迁移到其他 Linux 系统上,例如:
Rocky Linux(CentOS创始人对红帽停更不满而开发的)
Ubuntu
AlmaLinux
Alibaba Cloud Linux 等
二、如何解决问题
All mirror URLs are not using ftp, http[s] or file. Cannot find a valid baseurl for repo: base
20201205 centos6 20201130 停止维护了 官方源已经没有用了 镜像源也肯定没用了
YUM报错那是肯定的!!!
解决方法:
新的源: mirrors.aliyun.com/centos-vault
修改 /etc/yum.repos.d 中的 CentOS-Base.repo
1.注释所有的 mirrorlist= #mirrorlist=
2.取消所有的 baseurl 注释
3.将 baseurl 中的mirrorlist.centos.org/centos改为 mirrors.aliyun.com/centos-vault
将mirrorlist注释掉,启用baseurl。我的修改成下面这个样子,要注意baseurl要修改成自己centos的版本号,我的是6.7
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
#mirrorlist=http:/

本文讲述了CentOS 7即将停止维护,建议切换到CentOSStream或付费的RHEL。遇到'baseurl not found'问题时,给出了通过aliyun镜像源替换原有官方源的详细步骤,包括修改yum配置并清理缓存以成功安装软件。

4万+

被折叠的 条评论
为什么被折叠?



