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