Why centos yum error

藏色散人
Release: 2022-01-17 14:14:45
Original
3979 people have browsed it

centos yum error is because the network card failed to start with the operating system. The solution: 1. Log in to the current CentOS7 as root; 2. Enter "ls -a" in the shell; 3. Modify the network card configuration file; 4. Restart the operating system.

Why centos yum error

The operating environment of this article: CentOS 7 system, Dell G3 computer.

Why centos yum error?

Solution to the problem that centos-yum cannot be used normally

After installing CentOS 7 in minimal mode, to be honest, I am not used to it and don’t like pure shell. After logging in with the root account, I immediately wanted to install GNOME, but found that yum did not work properly! ! !

1. Enter the command to install X Window. An installation error occurred! !

Enter the command in the shell: yum groupinstall "X Window System", then press Enter, execute the current command, and find that yum does not work properly! ! ! !

#Second, verify whether yum is installed normally!

Enter: yum --help in the shell, the result shows that yum has been installed normally! ! What went wrong? After some tips from netizens, I found out that maybe my network card failed to start up with the operating system! ! !

# Third, modify the network card configuration so that the network card is automatically enabled with the operating system! !

1. Make sure you are using the root account to perform the following operations. If you are not root, you must first log in to the current CentOS 7 as root!

2. Enter the command in the shell: cd /etc/sysconfig/network-scripts, then press Enter to enter this directory. Then enter: ls -a in the shell and press Enter. All files in this directory will be displayed.

3. Modify the network card configuration file. "ifcfg-ens33" is my network card configuration file. I use vi to edit it. In the shell, enter: vi ifcfg-ens33, then press Enter and press the "i" key to enter vi editing mode. Now you can edit this file. !

4. Change the value of "ONBOOT" to "yes". The network card installed by CentOS minimally installed is not enabled by the system by default, so the default value of this item is "no" ". After changing it to "yes", directly enter ":wq" to save the current changes and exit vi.

#5. Restart the operating system. Enter: reboot in the shell, then press Enter to restart the operating system.

6. Verify whether yum can work normally. After logging in to the system, enter: yum grouplist in the shell. If the network card is set correctly, then yum should be able to work normally, as shown below:

Recommended tutorial: "centos tutorial"

The above is the detailed content of Why centos yum error. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!