解决Couldn't resolve host 'mirrorlist.centos.org

[root@node1 yum.repos.d]# yum makecache

Loaded plugins: fastestmirror

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


1)[root@node1 yum.repos.d]# vi /etc/resolv.conf

nameserver 8.8.8.8
nameserver 202.106.0.20
2) [root@node1 yum.repos.d]# /etc/init.d/network restart

3)[root@node1 yum.repos.d]# yum makecache
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.bit.edu.cn
 * extras: mirror.bit.edu.cn
 * updates: mirror.bit.edu.cn
base                                                                                                                         | 3.7 kB     00:00     
base/group_gz                                                                                                                | 226 kB     00:01     
base/filelists_db                                                                                                            | 6.4 MB     00:15     
base/primary_db                                                                                                              | 4.7 MB     00:11     
base/other_db                                                                                                                | 2.8 MB     00:07     
extras                                                                                                                       | 3.4 kB     00:00     
extras/filelists_db                                                                                                          |  25 kB     00:00     
extras/prestodelta                                                                                                           | 1.3 kB     00:00     
extras/primary_db                                                                                                            |  29 kB     00:00     
extras/other_db                                                                                                              |  30 kB     00:00     
updates                                                                                                                      | 3.4 kB     00:00     
updates/filelists_db                                                                                                         | 734 kB     00:01     
updates/prestodelta                                                                                                          |  36 kB     00:00     
updates/primary_db                                                                                                           | 864 kB     00:01     
updates/other_db                                                                                                             | 9.4 MB     00:25     
Metadata Cache Created

ok



你可能感兴趣的:(大数据学习)