Error: Cannot find a valid baseurl for repo: base when using yum command

First of all, the network configuration of my host machine is as follows:
Insert picture description here
Therefore, when I configure linux dns, I also configure 192.168.0.1. It is no problem to access the external network, but there are errors when using the yum command.
Insert picture description hereChange the priority of 192.168.0.1 and 8.8.8.8. Initially, DNS1=192.168.0.1. This configuration is mainly to be consistent with the dns of the host. Save and exit, service network restartrestart the network configuration, and try the yum command again.
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_41885819/article/details/112785405