Linux中在线安装有问题:"Couldn't resolve host 'mirrorlist.centos.org'"

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操作,成功!


后序的方法:



你可能感兴趣的:(java中常出现的错误)