报错
yum install error
[root@localhost cmake-3.2.2]# yum install gcc
Loaded plugins: fastestmirror, refresh-packagekit, security
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 retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
[root@localhost cmake-3.2.2]# yum install gcc-c++
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
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
解决方法
修改dns配置
vi /etc/resolv.conf
## 在此文件最后加入:
nameserver 114.114.114.114