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

概述

当我要yum install nspr时报错:

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 加上一行

nameserver 8.8.8.8

然后就行了。

最后

以上就是自觉煎饼为你收集整理的yum install 出现 Couldn't resolve host的全部内容,希望文章能够帮你解决yum install 出现 Couldn't resolve host所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

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

评论列表共有 0 条评论

立即
投稿
返回
顶部