Home > Article > Operation and Maintenance > How to solve the problem of centos 7 yum being unavailable
centos 7 yum unavailable solution: 1. Log in to the current CentOS7 as root; 2. Modify the network card configuration file; 3. Change the value of "ONBOOT" to "yes"; 4. Restart the operation System is enough.
The operating environment of this article: CentOS 7 system, DELL G3 computer
How to solve the problem of centos 7 yum being unavailable?
CentOS 7 - After minimal installation, solve the problem of being unable to use the yum command!
After installing CentOS 7 in the minimal way, to be honest, I am really not used to and don’t like working in pure shell mode. 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 in the CentOS mini-installation 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:
The above is the detailed content of How to solve the problem of centos 7 yum being unavailable. For more information, please follow other related articles on the PHP Chinese website!