Sometimes you will encounter an error reported by the yum update command, and you need to update the yum source
The way to update is to create a new CentOS-Base.repo file under the /etc/yum.repos.d/ directory. This file is downloaded from the Internet. Note that you need to download the file corresponding to the operating system version. For example, if I am CentOS 6, I will matching files
After downloading, execute two commands
yum clean all
yum makecache