我是靠谱客的博主 自觉煎饼,这篇文章主要介绍yum install 出现 Couldn't resolve host,现在分享给大家,希望可以做个参考。

当我要yum install nspr时报错:

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
http://mirrors.tuna.tsinghua.edu.cn/centos/6.9/os/x86_64/Packages/nspr-4.13.1-1.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.tuna.tsinghua.edu.cn'" Trying other mirror. http://mirrors.btte.net/centos/6.9/os/x86_64/Packages/nspr-4.13.1-1.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.btte.net'" Trying other mirror. http://mirrors.zju.edu.cn/centos/6.9/os/x86_64/Packages/nspr-4.13.1-1.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.zju.edu.cn'" Trying other mirror. http://mirrors.aliyun.com/centos/6.9/os/x86_64/Packages/nspr-4.13.1-1.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.aliyun.com'" Trying other mirror. http://mirrors.neusoft.edu.cn/centos/6.9/os/x86_64/Packages/nspr-4.13.1-1.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.neusoft.edu.cn'" Trying other mirror. http://mirrors.njupt.edu.cn/centos/6.9/os/x86_64/Packages/nspr-4.13.1-1.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.njupt.edu.cn'" Trying other mirror.

想了想应该是网关问题,我重启过服务器,之前的配置的/etc/resolv.conf没了。
解决办法:
给/etc/resolv.conf 加上一行

复制代码
1
nameserver 8.8.8.8

然后就行了。

最后

以上就是自觉煎饼最近收集整理的关于yum install 出现 Couldn't resolve host的全部内容,更多相关yum内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(65)

评论列表共有 0 条评论

立即
投稿
返回
顶部