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

王林
Release: 2020-03-21 14:47:52
Original
3096 people have browsed it

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
Copy after login

(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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template