Project scenario:
When deploying the LAMP environment, yum cannot install the service, prompting that the repository AppStream appears in the configuration many times
Problem Description
Repository AppStream appears multiple times in configuration
Repository extras appear multiple times in config
Repository PowerTools appears multiple times in configuration
Repository centosplus appears multiple times in configuration
......
Cause Analysis:
There are multiple configuration files under the /etc/yum.repos.d/ file, so the error message is repeated
Solution:
1. Delete the CentOS-file under /etc/yum.repos.d
[root@lzm yum.repos.d]# rm -rf CentOS-*
2. CentOS 8 end of life cycle switching source
[root@lzm ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
3. Clean up the yum cache and re-establish the cache (let the new yum source take effect)
[root@lzm ~]# yum clean all && yum makecache
4. Reinstall the required services (can be installed successfully)