YumRepo Error_ All mirror URLs are not using ftp, http[s] or file. Eg. Invalid release_repo_arch co

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

一、背景

继 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:/
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值