今天在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
......此处省略
 

【转】解决yum安装软件报Couldn't resolve host 'mirrorlist.centos.org问题的更多相关文章

  1. yum命令安装软件时,出现--centos 7 安装apache 出现 Could not resolve host: mirrorlist.centos.org; 未知的错误"--CentOS网络设置 couldn't resolve host 'mirrorlist.centos.org问题解决

    CentOS网络设置 couldn't resolve host 'mirrorlist.centos.org问题解决 今天在虚拟机上安装完CentOS6.5之后,首次使用时yum命令安装软件时,出现 ...

  2. Centos7报Could not resolve host: mirrorlist.centos.org; Unknown error(VMware网络设置)

    软件:VMware 12 Linux版本:centOS 7 网络设置:桥接模式 安装后ping百度网址时报错:Name or service not know,使用yum安装时报错:Could not ...

  3. yum安装软件报错Segmentation fault处理

    yum安装软件报错Segmentation fault处理 在使用yum 更新软件时提示:Segmentation fault 中文错误提示: 段错误 [root@CMS-BAK:/usr/local ...

  4. yum安装软件报错:curl#6 - "Could not resolve host: mirrorlist.centos.org; Temporary failure in name resolut

    # yum install -y epel-release Loaded plugins: fastestmirror Repository base is listed more than once ...

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

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

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

  7. 解决Couldn't resolve host 'mirrorlist.centos.org

    这个错误引起主要是因为环境读取不到yun引起的可以考虑/etc/sysconfig/network-scripts/ifcfg-eth0 配置出错导致网络不通.或者/etc/resolv.conf的D ...

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

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

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

随机推荐

  1. client产生CLOSE_WAIT状态的解决方式

    现象 生产环境和測试环境都发现有个外围应用通过搜索服务调用搜索引擎时.偶尔会出现大量的訪问超时的问题,通过例如以下方式进行分析排查: l 首先是拿到搜索服务的JavaCore.发现其堵在HttpCli ...

  2. IOS越狱开发环境搭建

    1:安装 mac ports 2:安装DPKG, 在终端输入sudo port -f install dpkg即可安装 3:安装theos Theos是一个基于Make的编译环境,我们正是用它来编译生 ...

  3. 解决linux下cocos2dx不能播放声音

    cocos2dx2.2.1在linux下引用#include "SimpleAudioEngine.h".报错找不到该文件. 改动makefile文件,加入 SHAREDLIBS ...

  4. 数据库中暂时表,表变量和CTE使用优势极其差别

    1 在写SQL时常常会用到暂时表,表变量和CTE,这三者在使用时各有优势: 1. 暂时表:分为局部暂时表和全局暂时表. 1.1局部暂时表,创建时以#开头,在系统数据库tempdb中存储. 在当前的链接 ...

  5. sublime text2 基本配置及结合Python 环境

    参考: http://www.cnblogs.com/figure9/p/sublime-text-complete-guide.html http://www.zhihu.com/question/ ...

  6. 数据类型总结——Number(数值类型)

    相关文章 简书原文:https://www.jianshu.com/p/9fb573ef10da 数据类型总结——概述:https://www.cnblogs.com/shcrk/p/9266015. ...

  7. 【Lucene4.8教程之五】Luke 2014-06-24 15:12 1092人阅读 评论(0) 收藏

    一.Luke基本内容 1.Luke简介 Luke可用于查看Lucene创建的索引,并对其进行基本操作. 2.创建Luke (1)从Github上下载源文件 https://github.com/tar ...

  8. js中单引号和双引号的区别(html中属性规范是用双引号,js中字符串规定是用单引号)(js中单引号区别和php很像:单引号快,双引号可转义字符,双引号可解析变量)

    js中单引号和双引号的区别(html中属性规范是用双引号,js中字符串规定是用单引号)(js中单引号区别和php很像:单引号快,双引号可转义字符,双引号可解析变量) 一.总结 1.html中属性规范是 ...

  9. Jupyter Notebook 常用快捷键

    Jupyter Notebook 提供了比 IPython 美观的多得多的可视化形式.(比如对于 pandas 下的 DataFrame 的展示,df.head(5)) Jupyter Noteboo ...

  10. 某整形数组中除了两个单身整数外, 其余的整数都是成对出现的, 利用C/C++代码求出这两个单身整数。 要求: 时间复杂度o(n), 空间复杂度o(1)------某公司招聘试题

    先看看这个题目:某整形数组中除了两个单身整数外, 其余的整数都是成对出现的, 利用C代码求出这两个单身整数. 要求: 时间复杂度o(n), 空间复杂度o(1). 我们先用最傻瓜的方式来做吧: #inc ...