Home >Operation and Maintenance >CentOS >What to do if yum update fails in centos system

What to do if yum update fails in centos system

王林
王林Original
2020-03-21 14:47:523083browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn