centos yum源配置|CentOS系统Yum出现”Cannot find a valid baseurl for repo”问题解决办法

更新时间:2020-03-29    来源:CentOS    手机版     字体:

【www.bbyears.com--CentOS】

有网友告知老左自己在腾讯云服务器上部署环境使用到yum命令的时候提示无法执行脚本有出现"Cannot find a valid baseurl for repo"问题提示。看到这样的问题肯定是源不通导致的,先搜索搜索是否有同样的解决方法,有的人用到需要更新repo的,也有的简单更新DNS的。

Cannot find a valid baseurl for repo

错误提示:  代码如下 [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
Could not retrieve mirrorlist 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 因为问题我也没有遇到过,就先用简单的方法试试,更换DNS。  代码如下 vi /etc/resolv.conf 然后将DNS换成两组 8 8 8 8 和 8 8 4 4

保存后退出,然后我们在执行yum命令可以看到是可以解决问题的。

解决YUM编译问题jquery17207668158997928764="31" src="http://filesimg.111cn.net/2015/12/21/20151221143116774.jpg" />

搞定,ping www.111cn.net  顺畅了,yum可以用了!第一件事情,就是去删除 /etc/resolv.conf 里面有问题的dns服务器。

本文来源:http://www.bbyears.com/caozuoxitong/90548.html

热门标签

更多>>

本类排行