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

link|improve this question
dig queries DNS servers directly. Since localhost is not a DNS name you should not expect dig localhost to work. I don't know about your actual problem. – Kevin Reid Dec 1 '11 at 17:47
Its a very strange problem, I solved now! I had to do a new clean install of Lion by DVD. – user968898 Dec 2 '11 at 0:15
feedback

1 Answer

Solved by running a new clean install of Mac OS X Lion by DVD.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.