Host: parse / etc / resolv.conf

I get an error and I don’t see what is happening, and see if you can catch what happened.

Whenever I use the host command, I get this error:

xavi@cobalto:~$ host www.guparty.com
host: parse of /etc/resolv.conf failed

I think the syntax is correct:

xavi@cobalto:~$ cat /etc/resolv.conf
search dsitelecom.com
nameserver 8.8.8.8 8.8.4.4

Permissions are also available to everyone:

xavi@cobalto:~$ ls -l /etc/resolv.conf
-rw-r--r-- 1 root root 49 2011-10-30 12:02 /etc/resolv.conf

This is probably stupid, but I can’t understand it. Do you see something wrong there?

Thank!

+8
source share
3 answers

Check your syntax, you need to define one name server per line in /etc/resolv.conf

search dsitelecom.com
nameserver 8.8.8.8 
nameserver 8.8.4.4
+12
source

I had a similar problem, but I did and got the job:

# mv resolv.conf resolv.conf.old
# cat resolv.conf.old
search example.com
domain example.com
nameserver 11.22.33.44
nameserver 2000::1
# echo "search example.com" >>resolv.conf
# echo "domain example.com" >>resolv.conf
# echo "nameserver 11.22.33.44" >>resolv.conf
# echo "nameserver 2000::1" >>resolv.conf

, . resolv.conf , . , , resolv.conf. , , , . , .

0

I saw the same error when, by mistake, Unix EOLs ("\ n") were replaced with windows ("\ r \ n"). Decision:dos2unix filename

0
source

All Articles