CentOS 7在执行yum操作时,
报错: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
解决方案:
CentOS 7在执行yum操作时,
报错: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
经过查阅资料,得知这个错误是因为没有配置/etc/resolv.conf。
解决方法:
vi /etc/resolv.conf
:wq保存退出即可,之后再执行yum操作,成功!
后序的方法:
本文介绍了解决CentOS7中执行yum操作时出现的错误:无法获取镜像列表及找不到有效的baseurl的问题。错误源于未配置/etc/resolv.conf文件。通过编辑并保存此文件,可以成功执行yum命令。
1万+

被折叠的 条评论
为什么被折叠?



