Home >Operation and Maintenance >CentOS >What to do if yum update fails in centos system
Solution:
Just change the mirror source.
Execute the following commands in sequence:
cd /etc/yum.repos.d mv CentOS-Base.repo CentOS-Base.repo.bak vi CentOS-Base.repo
(Recommended tutorial: centos usage tutorial)
Modify the configuration as follows:
[base] name=Red Hat Enterprise Linux 7.0 -Base baseurl=http://mirrors.163.com/centos/7/os/$basearch/ gpgcheck=1 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7 [update] name=Red Hat Enterprise Linux 7.0 -Updates baseurl=http://mirrors.163.com/centos/7/updates/$basearch/ gpgcheck=1 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7 [extras] name=Red Hat Enterprise Linux 7.0 -Extras baseurl=http://mirrors.163.com/centos/7/extras/$basearch/ gpgcheck=1 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
Save That’s it.
Recommended related video tutorials: linux video tutorial
The above is the detailed content of What to do if yum update fails in centos system. For more information, please follow other related articles on the PHP Chinese website!