Mac OS X Lion cannot resolve localhost [closed]
Question
I have found serval questions about this but no one helps for me, I am searching for days to get my problem solved but I can't get it done, I hope someone can help me with this big issue.
I try to ping my localhost, I need this to develop my web apps. I do this by zendServer.
This problem cames up when I upgraded my OS X to Lion.
I use internet over Apple timecapsule but I think this doesn't matter to make it able to use your localhost?
Host file (sudo nano /private/etc/hosts):
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
Dig result:
leny-pc:~ nickyklaasse$ dig localhost
; <<>> DiG 9.7.3-P3 <<>> localhost
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18908
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;localhost. IN A
;; ANSWER SECTION:
localhost. 10800 IN A 127.0.0.1
;; Query time: 20 msec
;; SERVER: 192.168.1.254#53(192.168.1.254)
;; WHEN: Thu Dec 1 13:08:07 2011
;; MSG SIZE rcvd: 43
Host result:
leny-pc:~ nickyklaasse$ host localhost
localhost has address 127.0.0.1
localhost has IPv6 address ::1
Ping result:
leny-pc:~ nickyklaasse$ ping localhost
ping: cannot resolve localhost: Unknown host
I hope some one can help me to an answer.
With kind regards,
Nicky
Solution 2
Resolved by a clean new installation of Mac Os Lion by DVD
OTHER TIPS
Comment this 2 lines and try again:
::1 localhost
fe80::1%lo0 localhost
and let me know what happen
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow