解决Couldn't resolve host 'mirrorlist.centos.org
这个错误引起主要是因为环境读取不到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 -yLoaded plugins: fastestmirror, securityLoading mirror speeds from cached hostfileCould not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was14: 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.confnameserver 8.8.8.8nameserver 202.106.0.20 |
重启网络服务
[root@multi-mysql ~]# /etc/init.d/network restartShutting 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 -yLoaded plugins: fastestmirror, securityLoading mirror speeds from cached hostfile * base: mirrors.yun-idc.com * extras: mirrors.yun-idc.com * updates: mirrors.yun-idc.combase | 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 ProcessResolving 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的更多相关文章
- 20200311_解决Could not resolve host: mirrorlist.centos.org
[root@localhost ~]# yum -y install wget 已加载插件:fastestmirror Determining fastest mirrors Could not re ...
- 【转】解决yum安装软件报Couldn't resolve host 'mirrorlist.centos.org问题
转自:http://blog.51cto.com/oldcat1981/1719825 今天在linux环境通过yum安装软件报了以下错误: [root@multi-mysql yum.rep ...
- "Could not resolve host: mirrorlist.centos.org; Unknown error"解决方法
这两天学习历程可谓历尽坎坷,昨天在vSphere Client中安装完CentOS系统后,今天尝试在系统中安装mysql数据库. 由于刚接触Linux,所以对于一些常用指令和操作并不熟悉,也是一边百度 ...
- couldnt resolve host mirrorlist.centos
解决centos 6.3 yum安装软件时找不到镜像问题 [root@nagios-server ~]# yum update –y Loaded plugins: fastestmirror Lo ...
- linux安装软件时提示找不到镜像的问题:Couldn't resolve host 'mirrorlist.centos.org'
问题:[root@cddserver2 ~]# yum -y install gcc-*Loaded plugins: fastestmirror, prestoCould not retrieve ...
- 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 ...
- 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误"
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误" One of the configured ...
- Could not resolve host: mirrorlist.centos.org Centos 7 Unkown error
安装Centos7(core)以后,网卡默认不会启用.这是一个大坑,直接报错,这是一个过度优化,有几个开发人员/运维人员安装centos7(core)不用ssh去连接服务器的. 报错如下: Loade ...
- 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 ...
随机推荐
- vue+ElementUI——表格分页(前端实现方法)
1.使用ElementUI中的<el-table></el-table>和 <el-pagination></el-pagination>组件来实现 2 ...
- 【JZOJ6350】考试(test)
description analysis 对于\(n=0\)的点,直接模拟就好了 状压\(DP\),设\(f[i][j][S]\)表示到第\(i\)题.连续\(GG\)了\(j\)题.喝的饮料集合为\ ...
- Oracle数据导入导出命令
IMP 和EXP命令 Oracle数据导入导出imp/exp就相当于oracle数据还原与备份.exp命令可以把数据从远程数据库服务器导出到本地的dmp文件,imp命令可以把dmp文件从本地导入到远处 ...
- hadoop快照管理
快照相当于对目录做备份,并不会复制所有文件,而是记录文件的变化命令用法 ()hdfs dfsadmin -allowSnapshot 路径 (开启指定目录的快照功能) ()hdfs dfsadmin ...
- win10 mysql5.7指定某个配置文件启动
点击开始菜单,搜索cmd.exe,左击以管理员身份运行 C:\Users\Administrator>cd C:\Program Files\MySQL\MySQL Server 5.7\bin ...
- 从零学React Native之13 持久化存储
数据持久化就是指应用程序将某些数据存储在手机存储空间中. 借助native存储 这种方式不言而喻,就是把内容传递给native层,通过原生API存储,详见从零学React Native之05混合开发 ...
- 线程池_ThreadPool
using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Imaging; ...
- 重写、super关键字、final关键字、多态、子类型转换、抽象的初步了解
重写 含义 在Java中,子类可继承父类中的方法,而不需要重新编写相同的方法.但有时子类并不想原封不动地继承父类的方法,而是想作一定的修改,这就需要采用方法的重写.方法重写又称方法覆盖. 重写与重载的 ...
- 06_mybatis关系映射
1.数据库表分析 表与表之间的业务关系: 在分析表与表之间的业务关系时需要建立 在某个业务意义基础上去分析; 先分析数据级别之间有关系的表之间的业务关系; usre和orders: use ...
- 按指定规则统计list中数据,groupby用法
有的情况下,只是想要简单地对list中数据,进行分组,查看,可以考虑使用groupby 代码: # groupby需要排序后才能使用 def gb(num): if 0 <= num < ...