今天在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. 全双工 串口 stm32

  2. VIM使用说明

    [vim 命令-移动光标]:h 的鍵位于左邊,每次按下就會向左移動.l 的鍵位于右邊,每次按下就會向右移動.j 鍵看起來很象一支尖端方向朝下的箭頭.k朝上移动. [vim 命令-启动和退出]:1. 請 ...

  3. 算法 Tricks(六)— if 条件分支的简化

    考虑下面的三分支的定义式: f=⎧⎩⎨⎪⎪a,b,a+b,x>yx<yx=y int f = 0; if (x >= y) f += a; if (x <= y) f += b ...

  4. 可直接复制粘贴的boostrap图标库网址

    1:http://fontawesome.dashgame.com/ 2:http://www.kuiyu.net/art-34.html 3:http://www.bootcss.com/p/fon ...

  5. Eclipse下配置Ant脚本 自己主动打包带签名的Android apk

    尽管eclipse非常少用了,可是在古老的项目上还是会用到.一个麻烦事是打带签名包的时候.非常不方便.下边纪录下配置ant,自己主动打包带签名apk的过程,作为备忘.(PC环境为MAC) 1,第一步得 ...

  6. js循环一维数组按指定长度截取为二维数组

    //随便创建一个数组 let data = "abcdefghijklmnopkrstuvw12322999".split(""); //总数组 let pro ...

  7. JavaScript对象的创建

    原文 简书原文:https://www.jianshu.com/p/6cb1e7b7e379 大纲 前言 1.简单方式创建对象的方法 2.工厂模式创建对象 3.构造函数模式创建对象 4.原型模式创建对 ...

  8. MCMC:Gibbs 采样(matlab 实现)

    MCMC: The Gibbs Sampler 多元高斯分布的边缘概率和条件概率 Marginal and conditional distributions of multivariate norm ...

  9. Kinect 摄像头范围介绍和玩家舒适距离实测

    本文章由cartzhang编写,转载请注明出处. 所有权利保留. 文章链接: http://blog.csdn.net/cartzhang/article/details/44588097 作者:ca ...

  10. 【hdu 3537】Daizhenyang's Coin

    Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s) ...