生命不息,折腾不止!

Viva La Vida

virmach centos8 repo配置

cent0s 8 会报错  Error: Failed to synchronize cache for repo ‘AppStream’

mv CentOS-AppStream.repo CentOSApp.repo

mv CentOS-Base.repo CentOSBase.repo

mkdir /etc/yum.repos.d/repo.bak

mv CentOS-* repo.bak/

修改CentOSApp.repo内容为


# CentOS-AppStream.repo
[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-centosofficial

修改CentOSBase.repo内容为

 

# CentOS-Base.repo
[BaseOS]
name=CentOS-$releasever - Base
baseurl=https://mirrors.aliyun.com/centos/8-stream/BaseOS/$basearch/os/
        http://mirrors.aliyuncs.com/centos/8-stream/BaseOS/$basearch/os/
        http://mirrors.aliyuncs.com/centos/8-stream/BaseOS/$basearch/os/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official 

执行

yum clean all

yum makecache

点赞

发表评论

您的电子邮箱地址不会被公开。