CentOS 8 最新阿里YUM源

由于CentOS8已终止服务,官方及第三方源不再可用。为了解决yum安装时的错误,可以下载阿里云的CentOS-Base.repo,修改AppStream文件以切换到阿里源,清除yum缓存并更新。通过执行一系列命令,如yuminstallwget,可以成功安装程序。

前文:由于CentOS8 已停止服务,相关源已经停止,前期官方自带的源和前期 阿里、清华、网易 等等的源,都已无法再使用,需要更换源。

安装程序时报错:

Failed to synchronize cache for repo 'AppStream', ignoring this repo.
Failed to synchronize cache for repo 'BaseOS', ignoring this repo.
Last metadata expiration check: 0:10:58 ago on Fri 10 Mar 2023 04:40:50 PM HKT.
No match for argument: wget
Error: Unable to find a match

解决方法:

1、下载阿里yum源:

curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo

2、修改AppStream文件,改为阿里源

sed -i 's/^/#/g' /etc/yum.repos.d/CentOS-AppStream.repo && echo "
[AppStream]
name=CentOS-\$releasever - AppStream
baseurl=https://mirrors.aliyun.com/centos/8-stream/AppStream/\$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-cento
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值