yum出现Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile解决方法

摘要:
yum出现Couldnotretrievemirrorlist解决方法Loadedplugins:fastestmirror,securityLoadingmirrorspeedsfromcachedhostfileCouldnotretrievemirrorlisthttp://mirrorlist.centos.org/?release=6&arch=i386&repo=oserrorwas1
yum出现Could not retrieve mirrorlist解决方法

Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=i386&repo=os error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base

  • 1

在centos中使用yum安装软件时可能出现Could not retrieve mirrorlist,这种情况一般是网络出现问题。

方法/步骤

  1. 如果配置的DHCP动态网络,则在/etc/resolv.conf文件中添加

    nameserver 8.8.8.8

  2. 如果是静态网络,则在/etc/sysconfig/network-scripts/ifcfg-eth0文件中添加

    DNS1=8.8.8.8

    yum出现Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile解决方法第1张
  3. 3

    然后重启网络服务,

    service network restart

    https://jingyan.baidu.com/article/6c67b1d6f492d62786bb1e45.html

免责声明:文章转载自《yum出现Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile解决方法》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇snprintf()函数使用方法COGNOS主要产品比较下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

Centos7下安装Docker(详细的新手装逼教程)

早就听说过Docker,一直不清楚是个啥,今天捣鼓了一下,这里做个记录。 ----------------------------------------------------------------------------------------------------------------------------------------------...

redhat7.4切换yum源为免费源

1.redhat是Linux系统中付费的企业版,虽然安装什么是免费的,但是需要注册。 如果你有注册码,暂请出门左拐(我没有注册码,所以我也不会注册,不用往下看了)。 Linux系统收费版:RedHat 免费版:CentOS、ubuntu 2.安装时不会提醒你注册(没注意,可能会提示)。当你使用yum命令时,提示你redhat需要注册。 此时,我们就需要将y...

Linux Redhat 7 安装免费yum源

Linux Redhat 7 安装免费yum源 出处地址:http://www.cnblogs.com/nbartchen/p/8565816.html 1、查看是否安装相关包 rpm -qa|grep yum|xargs rpm -e --nodeps 2、下载rpm包到本地、并安装 curl -O http://mirrors.163.com/cent...

ELK 6安装配置 nginx日志收集 kabana汉化

#ELK 6安装配置 nginx日志收集 kabana汉化 环境 centos 7.4 ,ELK 6 ,单节点 服务端 Logstash 收集,过滤 Elasticsearch 存储,索引日志 Kibana 可视化 客户端 filebeat 监控、转发,作为agent filebeat-->Logstash-->Elasticsearch--...

centos重装yum

入坑原因:执行了yum -y update(欲哭无泪) 一、 清除已有的应用与依赖 1、删除现有Python[root@test ~]# rpm -qa|grep python|xargs rpm -ev --allmatches --nodeps ##强制删除已安装程序及其关联 [root@test ~]# whereis python |xargs...

yum 配置及yum 源配置

yum.conf 配置文件说明 yum 的配置文件分为两部分:main 和repository main 部分定义了全局配置选项,整个yum 配置文件应该只有一个main。常位于/etc/yum.conf 中。 repository 部分定义了每个源/服务器的具体配置,可以有一到多个。常位于/etc/yum.repo.d 目录下的各文件中。 yum.co...