CentOS Linux 8 - AppStream 错误:为
2022-03-16 本文已影响0人
江河湖海洋
centos8上安装软件时出现

原因:CentOS Linux 8操作系统版本在2022年12月31日结束了生命周期(EOL),Linux社区不再维护该操作系统版本。所有的CentOS Linux 8的yum源都无效!
解决办法:更换源
1.备份旧的源
cd /etc/yum.repos.d/
mkdir repoBack
mv *.repo repoBack/
2. 更新新的源
到阿里云网站 http://mirrors.aliyun.com/repo/
下载对应的repo文件
下载完成后传到 /etc/yum.repos.d/ 目录下
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
3. 清除旧的yum缓存并生成新的yum缓存
yum clean all
yum makecache

4.更新
yum update