关于yum repolist报错信息的处理

执行yum repolist命令会出现如下错误,提示是主机无法解析DNS。

[root@localhost ~]# yum repolist all
Loaded plugins: fastestmirror, langpacks
Repository base is listed more than once in the configuration
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"

Loading mirror speeds from cached hostfile
Loading mirror speeds from cached hostfile
Loading mirror speeds from cached hostfile
Loading mirror speeds from cached hostfile

解决方法:配置DNS解析文件就正常了,nameserver可以使本地可访问的或者是公网DNS服务器地址
[root@localhost ~]# cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 8.8.8.8

你可能感兴趣的:(服务器)