Bootstrap

解决centos8系统Failed to download metadata for repo ‘appstream‘

解决centos8系统Failed to download metadata for repo ‘appstream‘

原因:Centos8于2021年年底停止了服务,使用yum源安装时候报错,Failed to download metadata for repo ‘appstream‘,可以切换阿里镜像。

解决过程:

1.进入目录:

cd /etc/yum.repos.d/

执行5条命令:
命令1:

sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*

命令2:

sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

命令3:

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

命令4:

yum clean all

命令5:

yum makecache

4、最后测试yum安装

yum install wget –y
;