当在CentOS8下,使用yum安装程序时出现:为 repo ‘AppStream’ 下载元数据失败

更改以下三个文件

1. vi /etc/yum.repos.d/CentOS-AppStream.repo

[AppStream]
name=CentOS-$releasever – AppStream
baseurl=https://mirrors.aliyun.com/centos/$releasever-stream/AppStream/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

2. vi /etc/yum.repos.d/CentOS-Base.repo

[BaseOS]
name=CentOS-$releasever – Base
baseurl=https://mirrors.aliyun.com/centos/$releasever-stream/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

3. vi /etc/yum.repos.d/CentOS-Extras.repo

[extras]
name=CentOS-$releasever – Extras
baseurl=https://mirrors.aliyun.com/centos/$releasever-stream/extras/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

发表评论