linux安装软件时提示找不到镜像的问题:Couldn't resolve host 'mirrorlist.centos.org'

来源:互联网 发布:流行的网络歌手 编辑:程序博客网 时间:2024/05/24 04:02

[root@sulei sulei]# yum install docker
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&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服务器没有配置正确

1、打开文件/etc/resolv.conf在其中添加: nameserver 8.8.8.8 nameserver 8.8.4.4 search localdomain2、然后重启网卡:使用命令: service network restart
阅读全文
0 0
原创粉丝点击