【CentOS】VirtualBox yum cannot be used

【CentOS】VirtualBox yum cannot be used

yum install net-tools -y

The following error occurs:

cannot find a valid baseurl for repo: base/7/x86_64或无法ping

The solution is as follows:
Enter the system and modify the network card information.
Insert image description here
Execute the modification command. The xxx after ifcfg-xxx is the above network card information.

vi /etc/sysconfig/network-scripts/ifcfg-enp0s3

Modify the file and change ONBOOT=no to ONBOOT=yes

Insert image description here
I've already finished changing this.

Restart the network card

ifup enp0s3

Then you can connect to the Internet normally


Guess you like

Origin blog.csdn.net/weixin_43874301/article/details/131469817