解决Ubuntu的Unable to resolve host name localhost问题:
How to fix it:
Make sure your /etc/hosts file has an appropriate entry for localhost (something like below)
127.0.0.1 localhost loopback
Make sure your /etc/nsswitch.conf file specifies a fallback to /etc/hosts, for example
hosts: dns [NOTFOUND=continue] files
在一个英文网站看到的!