国内服务器在运行命令yum -y install wget的时候,出现:

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

这种错误,是因为没有配置/etc/resolv.conf

/etc/resolv.conf 文件内写入:

nameserver 168.95.1.1

保存退出即可

如果忘记了或者使用的环境中没有提供DNS主机,那就设定Hinet那个最大DNS服务器,其IP是

168.95.1.1。要设定好DNS之后,未来上网浏览时,才能使用主机名。

DNS各地延迟排行榜(主)

  1. DNS派:★★★★

    DNS派是聚流科技旗下的DNS服务平台,为个人用户、网站主、企业提供各种有关DNS业务的服务,包括个人上网的域名解析服务、网站授权解析服务、企业域名解析服务等。

    DNS 服务器 IP 地址:

    首选(电信/移动/铁通):101.226.4.6

    备选(电信/移动/铁通):218.30.118.6

    首选(联通):123.125.81.6

    备选(联通):140.207.198.6

    作者点评:360出品!测试结果还不错!

  2. 百度 BaiduDNS:★★★

    百度DNS旗下云解析服务,依托百度一流基础设施和强大技术实力,为用户提供免费的、超越竞品的服务体验。没有套餐区分,安全,稳定,高效

    DNS 服务器 IP 地址:

    首选:180.76.76.76

    作者点评:暂时不知道百度有多少节点。不过应该也不少吧。

  3. CNNIC SDNS:★★★

    SDNS是由中国互联网络信息中心(CNNIC)正式推出的免费的公共云解析服务(SecureDNS,简称SDNS)。该服务可为广大网民提供安全、智能、高速的上网接入解析服务。

    DNS 服务器 IP 地址:

    首选:223.5.5.5

    备选:223.6.6.6

    作者点评:作为国家出品的DNS,有待测试......

  4. OpenDNS:★(不推荐)

    OpenDNS是一个免费的域名解析服务提供商(DNS)。创建于2006年,长期以来致力于为广大个人用户以及商务企业用户和公共领域提供免费的域名解析服务。

    DNS 服务器 IP 地址:

    首选:208.67.222.222

    备选:208.67.220.220

    作者点评:国内节点少!貌似就几个,不推荐使用!

  5. Google DNS:★(强烈不推荐)

    谷歌公共域名解析服务(Google Public DNS)是由谷歌公司于2009年发布的一项新的DNS服务。主要为了替代ISPs或其他公司提供的DNS服务。

    DNS 服务器 IP 地址:

    首选:8.8.8.8

    备选:8.8.4.4

    作者点评:机房在国外,国内无节点!你如果用了谷歌DNS你的信息有可能会免费出国转一圈才回来!强烈不推荐使用!只适合国外用户使用!

CentOS yum有时出现“Could not retrieve mirrorlist ”的解决办法——resolv.conf的配置的更多相关文章

  1. CentOS yum时出现“Could not retrieve mirrorlist ”的解决的方法——resolv.conf的配置

    原因:没有配置resolv.conf 解决方法: 到/etc文件夹下配置resolv.conf增加nameserver IP,如: nameserver 8.8.8.8 nameserver 8.8. ...

  2. CentOS yum时出现"Could not retrieve mirrorlist"

    问题描述: CentOS 6.x minimal(最小化) 安装, CentOS yum install net-tools 时出现"Could not retrieve mirrorlis ...

  3. CentOS----使用yum命令出现“could not retrieve mirrorlist http://mirrorlist.centos.org ***” - ybq155”

    无聊安装了个mini版的32位的CentOS 6.5,进来想安装个东西,yum install emacs 提示什么 Loaded plugins: fastestmirror, refresh-pa ...

  4. CentOS报错:Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock32 error was 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"

    今天安装完带图形界面的CentOS 7后,在Terminal中运行yum安装命令时报了以下错误: Could not retrieve mirrorlist http://mirrorlist.cen ...

  5. centos报错:Could not retrieve mirrorlist http://mirrorlist.centos.org/

    检查是否可以上网. ping 114.114.114.114 如果不可以,调试通.通了之后下一步: 然后检查DNS设置是否正常. ping www.baidu.com 不正常的话,设置DNS,如下: ...

  6. centos6.7用yum安装redis解决办法及IP限制配置

    在centos6.7用yum安装redis解决办法 - bluesky1 - 博客园 http://www.cnblogs.com/lanblogs/p/6104834.html yum instal ...

  7. centos git clone 报错 fatal: HTTP request failed 解决办法

    git clone报错提示 git clone https://github.com/xxxx.git Initialized empty Git repository in /root/xxxx/. ...

  8. Centos安装 Apache2.4提示 APR not found的解决办法

    在安装apache2.2.22版本的时候没有任何问题,可直接使用命令编译安装. 但是,在apache 2.4.12版本,./configure 进行配置时, 提示 configure: error: ...

  9. Existing lock /var/run/yum.pid: another copy is running as pid 解决办法

    yum只能支持一个例程运行,所以如果有一个例程已经在运行,其他的必须等待该进程退出释放lock.出现这种情况时,可以用以下命令来恢复: rm -f /var/run/yum.pid

随机推荐

  1. input输入框限制录入类型

    输入大小写字母.数字.下划线:<input type="text" onkeyup="this.value=this.value.replace(/[^\w_]/g ...

  2. python 模块的导入

  3. PLAY2.6-SCALA(七) Streaming HTTP response

    1.从HTTP1.1开始,服务端为了在single connection下对HTTP请求及响应提供服务,需要在response中提供响应的Content-Length. 默认情况下,不需要显示的指明C ...

  4. mysql操作手册

    开启日志:https://segmentfault.com/a/1190000003072237 常用词:  Mysql:一种免费的跨平台的数据库系统  E:\mysql:表示是在dos 命令窗口下面 ...

  5. Kubernetes1.4即将发布

    (一)发布历史 Kubernetes 1.0 - 2015年7月发布 Kubernetes 1.1 - 2015年11月发布 Kubernetes 1.2 - 2016年3月发布 Kubernetes ...

  6. Request中getContextPath、getServletPath、getRequestURI、request.getRealPath的区别

    1 区别 假定你的web application 名称为news,你在浏览器中输入请求路径: http://localhost:8080/news/main/list.jsp 1.1 System.o ...

  7. *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '[<_UIFeedbackParameters 0x1d4442e50> setNilValueForKey]: could not set nil as the value for the key rate.'

    *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '[<_UIFeedbac ...

  8. 计算php程序运行时间

    <?php   //程序运行时间 $starttime = explode(' ',microtime()); echo microtime(); /*········以下是代码区······· ...

  9. 洛谷P1510 精卫填海

    //01背包 求背包内物品价值超过某一定值时的最小体积 #include<bits/stdc++.h> using namespace std; ; ; int n,v_tot,w_tot ...

  10. Mysql 锁表处理

    -- 查看正在被锁定的的表 show ; -- 查看进程号 show processlist; -- 杀掉进程 : -- 表级锁次数 show status like 'Table%'; +----- ...