使用 yum update -y 报错 Repository extras is listed more than once in the configuration
On December 8, 2020, CentOS officially announced its plan to stop maintaining CentOS Linux, and launched the CentOS Stream project. CentOS Linux 8, as a replica of RHEL 8, has a shortened life cycle. Updates will be stopped on December 31, 2021. End of maintenance (EOL), more information can be found in the official announcement of CentOS. If you need to update CentOS, you need to mirror.centos.org
changevault.centos.org
The solution is as follows:
cd /etc/yum.repos.d/
#更新yum源为阿里源
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
#如果已经安装了wget就不需要这一步
yum install wget –y
yum clean all
yum makecache
#验证
yum install -y vim
``