Wednesday, March 3, 2010

Ubuntu - how to fix the annoying error "resolvconf: Error: /etc/resolv.conf must be a symlink"

How to fix the error: "resolvconf: Error: /etc/resolv.conf must be a symlink"

1. Kill the NetworkManager process:

sudo kill -9 `ps aux | grep sbin/NetworkManager | grep -v grep | awk '{print $2}'`

2. Run the resolvconf reconfiguration tool:

sudo dpkg-reconfigure resolvconf

(select YES, OK )

3. Verify that the resolv.conf file is ok:

ls -la /etc/resolv.conf

It should look very close to this:

lrwxrwxrwx 1 root root 31 2010-03-03 19:53 /etc/resolv.conf -> /etc/resolvconf/run/resolv.conf


4. Check the contents, it should have your name server(s) listed. The following shows an example using Comcast nameservers, and includes a router with address 192.168.0.1:

cat /etc/resolv.conf

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 68.87.74.162
nameserver 68.87.68.162
nameserver 192.168.0.1
search wp.comcast.net


5. Verify that it all works, try a restart of your system, and start with:
ping google.com
If you get a reply, your network works.


Share

2 comments:

  1. true, network manager makes a lot of troubles. it's working!

    ReplyDelete
  2. I'm glad this worked for you, George :)

    ReplyDelete