yum出现Could not retrieve mirrorlist解决方法

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

oaded 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


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

方法/步骤

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


2.nameserver 8.8.8.8


如果是静态网络,则在/etc/sysconfig/network-scripts/ifcfg-eth0文件中添加 注意:这里的DNS设置内容,不一定是这个,要根据实际情况使用,比如,我之前是用的就是 114.114.114.114 这里你可以使用DNS2 来添加新的内容,这样一来,就可以同时使用多个DNS地址了


DNS1=8.8.8.8

如果这个也不行,因为最近AI 多用这个跳转,你可以百度一下,其他的好用高速DNS代理节点。

27c5b41056b73e6df5ba31e2e1a9abff_4d345e935e9d189c2042910e7600fceb.png


3.然后重启网络服务,

service network restart

目录
相关文章
|
安全 网络协议 Linux
yum出现Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile解决方法
yum出现Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile解决方法
2452 3
|
缓存
yum install ansible无法直接安装Ansible的解决方法
准备三台机器: server.example.com node1.example.com node2.example.com 配置IP,主机名,/etc/hosts
1069 0
|
安全 Linux 虚拟化
解决Centos7 yum 出现could not retrieve mirrorlist 错误
在新安装的CentOS7.x通过VMware后,遇到无法通过`ip addr`获取IP地址以及`yum`安装软件时加载镜像列表失败的问题。
2257 2
|
数据库 容器
RPM属性依赖的解决方法: YUM线上升级
【5月更文挑战第14天】RPM属性依赖的解决方法: YUM线上升级。
134 1
|
缓存 Linux 开发工具
centos 7 yum安装失败(HTTP Error 404 - Not Found)的解决方法
centos 7 yum安装失败(HTTP Error 404 - Not Found)的解决方法
4711 0
|
KVM 虚拟化
Yum配置kvm时出现---Connot retrieve repository matedata balbalabal....
Yum配置kvm时出现---Connot retrieve repository matedata balbalabal....
Yum配置kvm时出现---Connot retrieve repository matedata balbalabal....
[There are unfinished transactions remaining.]【使用本地YUM源安装服务报错解决方法】
[There are unfinished transactions remaining.]【使用本地YUM源安装服务报错解决方法】
228 0
|
缓存 网络协议 Linux
CentOS8 yum install 报错Cannot prepare internal mirrorlist: No URLs in mirrorlist解决(替换yum源)
CentOS8 yum install 报错Cannot prepare internal mirrorlist: No URLs in mirrorlist解决(替换yum源)
CentOS8 yum install 报错Cannot prepare internal mirrorlist: No URLs in mirrorlist解决(替换yum源)
|
缓存 Linux 应用服务中间件
【在下版本,有何贵干?】Dockerfile中 RUN yum -y install vim失败Cannot prepare internal mirrorlist: No URLs in mirrorlist
【在下版本,有何贵干?】Dockerfile中 RUN yum -y install vim失败Cannot prepare internal mirrorlist: No URLs in mirrorlist
1154 0
【在下版本,有何贵干?】Dockerfile中 RUN yum -y install vim失败Cannot prepare internal mirrorlist: No URLs in mirrorlist
yum install 命令报错Could not retrieve mirrorlist
yum install 命令报错Could not retrieve mirrorlist
yum install 命令报错Could not retrieve mirrorlist

热门文章

最新文章

  • 1
    CentOS7 yum安装报错“Could not resolve host: mirrorlist.centos.org;"之解决办法(换源)
    5557
  • 2
    Linux中yum、rpm、apt-get、wget的区别,yum、rpm、apt-get常用命令,CentOS、Ubuntu中安装wget
    663
  • 3
    你需要在你的系统上安装`sqlmap`。这通常可以通过下载其源代码并编译,或者使用包管理器(如`apt`、`yum`或`pip`,但请注意,`pip`通常不直接提供`sqlmap`)来完成。
    305
  • 4
    【Linux】已解决:There are no enabled repos. Run “yum repolist all” to see the repos you have. You can en
    1939
  • 5
    Ngnix05---Ngnix安装方式介绍及源码安装的准备工作,Ngnix安装通过Ngnix源码安装和yum安装
    145
  • 6
    Ngnix07---通过yum安装Ngnix下 whereis ngnix可以查看Ngnix相关的一些目录,使用./nginx -y可以查看Ngnix版本及相关配置信息,使用 more CHANGES
    195
  • 7
    Ngnix09目录结构分析,使用tree工具可以Ngnix目录中以一个树的方式呈现出来,yum install -y tree,tail -f nginx/logs/access.log
    116
  • 8
    Linux部署实战前言,MySQL在CentOS安装【单机软件】,MySQL的安装需要root权限,yum install mysql,systemctl enable mysqld开机自启的意思
    671
  • 9
    IP地址和主机名,ifconfig查看本机的ip地址,无法用,yum -y install net-tools,输入ifconfig之后还会列明网卡,ens33表明的是网卡,inet ip地址,000
    203
  • 10
    Linux软件安装-Linux系统靠yum命令安装软件,yum命令是一个RPM包软件管理器,用于自动化安装配置Linux软件,.rpm是Linux包下的软件,yum install下载 wget re
    369