【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.
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
I've already finished changing this.
Restart the network card
ifup enp0s3
Then you can connect to the Internet normally