root@centos8 ~ yum install gcc
Repository AppStream is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository PowerTools is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository AppStream is listed more than once in the configuration
Repository PowerTools is listed more than once in the configuration
Repository base is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository extras is listed more than once in the configuration
解决方案:
备份文件
cd /etc/yum.repos.d && mkdir bak && mv *.repo ./bak wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
生成缓存
yum clean all yum makecache