本次问题出现在虚拟机安装的centos7系统之后,使用yum命令安装wget命令(yum -y install wget),出现could not resolve host mirrorlist.centos.org,看到一篇文章回答的不错

首先看看虚拟机是否有网络连接,尝试ping一下本地ip,如果ping的时候直接出现network is unreachable,那么说明虚拟机网络配置有问题,

打开:/etc/resolv.conf文件,配置DNS:这里根据系统配置,有的是8.8.8.8,这里有可能有误,建议使用第二种方式(免得耽误时间)

linux安装命令出错(could not resolve host mirrorlist.centos.org)

如果还是不行,那么直接把虚拟机的配置网络移除,从新添加:

linux安装命令出错(could not resolve host mirrorlist.centos.org)

然后在安装后,显示正常了

 

相关文章:

  • 2021-05-08
  • 2021-06-02
  • 2021-12-09
  • 2021-07-04
  • 2022-12-23
  • 2021-06-16
  • 2022-01-23
猜你喜欢
  • 2022-12-23
  • 2021-07-24
  • 2021-07-24
  • 2021-11-28
  • 2021-09-07
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案