Home > Operation and Maintenance > CentOS > What should I do if something goes wrong when using yum to install software under centos7?

What should I do if something goes wrong when using yum to install software under centos7?

王林
Release: 2020-03-30 10:03:39
Original
2562 people have browsed it

What should I do if something goes wrong when using yum to install software under centos7?

Problem restoration:

When learning docker, use online tutorials to execute the following commands:

Step one:

yum update
Copy after login

Step 2:

yum -y install docker
Copy after login

(Recommended tutorial: centos tutorial)

But when updating yum, the following error is always reported when entering the command:

What should I do if something goes wrong when using yum to install software under centos7?

Solution idea:

When encountering this kind of problem, I immediately suspected whether it was a network problem, so I checked the network configuration file:

[root@hdp2 ~]# cd /etc/sysconfig/network-scripts/
[root@hdp2 network-scripts]# vi ifcfg-ens33
Copy after login

Found The network configuration file is inconsistent with the virtual network gateway and needs to be changed to make it consistent.

The solution is as follows:

What should I do if something goes wrong when using yum to install software under centos7?

What should I do if something goes wrong when using yum to install software under centos7?

After modifying the gateway to be consistent, enter the following command to restart the network.

service network  restart
Copy after login

After completing this step, you can install docker, and then enter the command: yum update, and the network error will not be reported.

Recommended related video tutorials: linux video tutorial

The above is the detailed content of What should I do if something goes wrong when using yum to install software under centos7?. 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