Some netizens told the Old Man to prompt that "Cannot find a valid baseurl for repo" could not be executed when deploying the environment on the Tencent ECS to use the yum command. The problem is certainly caused by source failure. Search for the same solution first. Some people use the repo to update and some simply update dns.
Error message:
The code is as follows: |
Copy code |
[Root @ VM_17_139_centos ~] # Yum-y install wget screen python
Loaded plugins: fastestmirror, security
Setting up Install Process
Repository updates is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Loading mirror speeds from cached hostfile
Cocould not retrieve than list http://mirrorlist.centos.org /? Release = 6 & arch = x86_64 & repo = OS & infra = stock error was
12: Timeout on http://mirrorlist.centos.org /? Release = 6 & arch = x86_64 & repo = OS & infra = stock: (28, 'Operation too slow. Less than 1 bytes/sec transfered the last 30 seconds ')
Error: Cannot find a valid baseurl for repo: base
|
I have never encountered any problems, so I should try a simple method to change DNS.
The code is as follows: |
Copy code |
Vi/etc/resolv. conf
|
Then, replace the DNS with two groups: 8 8 8 8 and 8 8 4 4.
Save and exit. Then we can see that the problem can be solved by executing the yum command.
Ping www.111cn.net. yum can be used! The first thing is to delete the problematic dns server in/etc/resolv. conf.