Most likely the symbolic link /etc/resolv.conf -> ../run/resolvconf/resolv.conf is missing on your system. To restore it, do the following in a terminal.
sudo apt-get install resolvconf
sudo dpkg-reconfigure resolvconf
If you want to use 8.8.8.8 as your nameserver then set up either ifup or NetworkManager to use that nameserver address for the interface(s) that it brings up.
If you use ifup then edit /etc/network/interfaces and, in the stanza for the interface in question, add the line "dns-nameservers 8.8.8.8"; then ifdown the interface and ifup it again.
If you use NetworkManager then open the connection editor and add 8.8.8.8 as an additional nameserver address (network indicator | Edit Connections... | Wireless | myconnection | Edit... | IPv4 Settings | Additional DNS servers).
gedit
for the sake of future inexperienced users. – nanofarad Oct 18 '12 at 23:24user68186
said,resolv.conf
gets overwritten sometimes. I will try to use solution provided byNikTh
and see if it works. Thanks – Ubuntuser Oct 19 '12 at 08:46