Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

when m doing curl it says could not resolve host what can i do ?

curl | sudo sh

curl: (6) Couldn't resolve host ''


search x1
nameserver x2

nslookup result

Server:         x1
Address:        x1#53

Non-authoritative answer:
*** Can't find No answer

Non-authoritative answer: * Can't find No answer

share|improve this question

Make sure that your DNS is working fine:

$ nslookup

If not, change to Google's DNS and try again:

# echo "nameserver" > /etc/resolv.conf
# echo "nameserver" >> /etc/resolv.conf

i can access internet by proxy

You can make curl use HTTP proxy with:

$ curl -x proxyhost:port | sudo sh
share|improve this answer
pls check question with your answer result . – Rahul Mehta Oct 5 '11 at 4:40
Delete two first lines in /etc/resolv.conf and try again. – quanta Oct 5 '11 at 4:50
after deleteing when m doing nslookup it gives ;; connection timed out; no servers could be reached – Rahul Mehta Oct 5 '11 at 4:53
Do you have Internet connection? ping – quanta Oct 5 '11 at 4:54
i can access internet by proxy , and ping result is PING ( 56(84) bytes of data. – Rahul Mehta Oct 5 '11 at 4:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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