加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

yum出错Error: Cannot find a valid baseurl for repo: base

发布时间:2020-12-15 16:52:49 所属栏目:安全 来源:网络整理
导读:使用yum 命令 安装的时候出错: yum localinstall --nogpgcheck *.rpm 错误如下: Loading mirror speeds from cached hostfile Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6arch=i386repo=os error was 14: PYCURL ERROR 6 - "C



使用yum命令安装的时候出错:yum localinstall --nogpgcheck *.rpm

错误如下:

Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=i386&repo=os error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base

解决方法如下(修改dns配置)

vi /etc/resolv.conf

在此文件最后加入:nameserver xxx.xxx.xxx.xxx

如果没有vi编辑器可用:

echo "nameserver xxx.xxx.xxx.xxx" >>/etc/resolv.conf

然后pingwww.baidu.com

可以ping通,不会再出现unknow host

ok,安装依赖,

最后出现compelete即可

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读