cannot resolve localhost [closed]

被刻印的时光 ゝ 提交于 2019-12-12 05:48:47

问题


When I do a ping on localhost, I get "ping: cannot resolve localhost: Unknown host". A ping on 127.0.0.1 does work. So I checked my hosts file and everything looks so far correctly:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1             localhost
fe80::1%lo0     localhost

#Added by XAMPP Control
127.0.0.1 mkn.local

#Added by XAMPP Control
127.0.0.1 mkn.local

I also did a "dscacheutil -flushcache" but I still can't ping "localhost". The problem is that right now I can't debug anymore in eclipse because eclipse contacts localhost (and right now localhost cannot be resolved to 127.0.0.1).

Many thanks for any help in advance!

P.S. I have OSX 10.7.2 (Lion OS)


回答1:


I restored the hosts file from an older backup. I don't see any differences between my backuped hosts file and the current file. However, it works now .... magic



来源:https://stackoverflow.com/questions/7890663/cannot-resolve-localhost

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!