这个错误引起主要是因为环境读取不到yun引起的可以考虑/etc/sysconfig/network-scripts/ifcfg-eth0 配置出错导致网络不通。或者/etc/resolv.conf的DNS配置出错。或者可以考虑清楚yum缓存影响(yum clean all)

vi /etc/resolv.conf

nameserver 202.106.0.20(今天又出现此错误,这个nameserver加进去就好了。记得配置静态ip的话DNS也需要加入 然后update yum试试成功就OK了)

(下面是网上找到比较有用资料)

今天在linux环境通过yum安装软件报了以下错误:

[root@multi-mysql yum.repos.d]# yum install ncurses devel -y
Loaded plugins: fastestmirror, security
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

从字面意义上看是不能解析mirrorlist.centos.org这个地址,应该是跟dns网络配置有关系,最后解决方法是在DNS域名解析的配置文件增加DNS服务器的IP地址:

[root@multi-mysql ~]# vim /etc/resolv.conf
nameserver 8.8.8.8
nameserver 202.106.0.20

重启网络服务

[root@multi-mysql ~]# /etc/init.d/network restart
Shutting down interface eth0:                              [  OK  ]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:  Determining if ip address 192.168.1.202 is already in use for device eth0...
                                                           [  OK  ]

重新yum安装,正常

[root@multi-mysql ~]# yum install nmap -y
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: mirrors.yun-idc.com
 * extras: mirrors.yun-idc.com
 * updates: mirrors.yun-idc.com
base                                                                                                         | 3.7 kB     00:00     
base/primary_db                                                                                              | 4.6 MB     00:01     
extras                                                                                                       | 3.4 kB     00:00     
extras/primary_db                                                                                            |  33 kB     00:00     
updates                                                                                                      | 3.4 kB     00:00     
updates/primary_db                                                                                           | 2.6 MB     00:00     
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package nmap.x86_64 2:5.51-4.el6 will be installed
--> Finished Dependency Resolution
......此处省略
 
 
 

解决Couldn't resolve host 'mirrorlist.centos.org的更多相关文章

  1. 20200311_解决Could not resolve host: mirrorlist.centos.org

    [root@localhost ~]# yum -y install wget 已加载插件:fastestmirror Determining fastest mirrors Could not re ...

  2. 【转】解决yum安装软件报Couldn't resolve host 'mirrorlist.centos.org问题

    转自:http://blog.51cto.com/oldcat1981/1719825     今天在linux环境通过yum安装软件报了以下错误: [root@multi-mysql yum.rep ...

  3. "Could not resolve host: mirrorlist.centos.org; Unknown error"解决方法

    这两天学习历程可谓历尽坎坷,昨天在vSphere Client中安装完CentOS系统后,今天尝试在系统中安装mysql数据库. 由于刚接触Linux,所以对于一些常用指令和操作并不熟悉,也是一边百度 ...

  4. couldnt resolve host mirrorlist.centos

     解决centos 6.3 yum安装软件时找不到镜像问题 [root@nagios-server ~]# yum update –y Loaded plugins: fastestmirror Lo ...

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

    问题:[root@cddserver2 ~]# yum -y install gcc-*Loaded plugins: fastestmirror, prestoCould not retrieve ...

  6. yum 安装报错: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"

    [root@venn09 ~]# yum install -y vim Loaded plugins: fastestmirror Could not retrieve mirrorlist http ...

  7. 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误"

    14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误" One of the configured ...

  8. Could not resolve host: mirrorlist.centos.org Centos 7 Unkown error

    安装Centos7(core)以后,网卡默认不会启用.这是一个大坑,直接报错,这是一个过度优化,有几个开发人员/运维人员安装centos7(core)不用ssh去连接服务器的. 报错如下: Loade ...

  9. 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 ...

随机推荐

  1. c# 使用Expression 生成sql

    使用Expression 生成sql  update语句的时候遇到了个问题 ,Expression<Action<T>>  la   这个委托里面老获取不到 引用类型的值,甚至 ...

  2. bc 进制间转换

    我们通过bc的ibase和obase方法来进行进制转换 ibase是输入数字的进制,而obase就是输出数字的进制 两种方式进行转化 交互式的 ==注意:需要先设置obase== [root@dev ...

  3. 广义欧拉降幂(欧拉定理)——bzoj3884,fzu1759

    广义欧拉降幂对于狭义欧拉降幂任然适用 https://blog.csdn.net/qq_37632935/article/details/81264965?tdsourcetag=s_pctim_ai ...

  4. (转)Android中RelativeLayout各个属性的含义

    转:http://blog.csdn.net/softkexin/article/details/5933589 android:layout_above="@id/xxx"  - ...

  5. eclipse+terminal

    eclipse 怎么安装terminal插件   1 首先打开eclipse,找到help菜单,点击Eclipse Marketplace. 2 在search框里输入Terminal,点击Go查找. ...

  6. 2day:Python基础

    基础知识: 1.python文件的后缀名:.py 2 .Windows Python的执行方式:Python 解释器路径  py文件路径 例:C:\python3\python.exe d:\1.py ...

  7. 第二十二篇:Spring简单定时任务

    背景:有些操作,不适合放在页面上让用户手动触发去执行,比如一些需要不断更新的数据(如统计数据)有些需要同步的数据,不需要非常实时,可以在固定的时间或者固定的频率执行同步 第一步:配置xml第二步:编写 ...

  8. 第十九篇:Mysql两次Group by和ip转数字作比较的一次优化

    业务场景:两张表,ipconfig_group表存了单位和 ip 起始段信息 visit_info表存储了访问次数,失败次数,访问流量,用户ip等信息 两张表的关系为:    一个部门下有若干ip段, ...

  9. JavaScript实现几种常见的图形

    一.四种常见的三角形 第一种三角形: for(var i=1;i<=5;i++){        for( var j=i;j<=5;j++){                 docum ...

  10. Python3升级3.6强力Django+杀手级xadmin打造在线教育平台✍✍✍

    Python3升级3.6强力Django+杀手级xadmin打造在线教育平台 教程 Xadmin安装方法: settings.py 的配置: users App 下的 adminx.py 的配置: