Wednesday, February 25, 2009

resolvconf: Error: /etc/resolv.conf must be a symlink

fix:
/etc$ sudo ln -s /etc/resolvconf/run/resolv.conf

5 comments:

BV said...

Great..that worked...thanks for posting the solution

H T said...

Actually, for me it required to follow the following steps (I learned from launchpad, bug #324233):

Before:

$ ls -l /etc/resolv.conf
-rw-r--r-- 1 root root 30 2009-08-16 13:38 /etc/resolv.conf

$ sudo mkdir /etc/postfix
$ sudo touch /etc/postfix/main.cf
$ sudo rm /etc/resolv.conf
$ sudo ln -s /etc/resolvconf/run/resolv.conf /etc/resolv.conf
$ ls -l /etc/resolv.conf
lrwxrwxrwx 1 root root 31 2009-08-16 13:42 /etc/resolv.conf -> /etc/resolvconf/run/resolv.conf
$ sudo reboot

After:

$ ls -l /etc/resolv.conf
lrwxrwxrwx 1 root root 31 2009-08-16 13:42 /etc/resolv.conf -> /etc/resolvconf/run/resolv.conf

n0b3l1a said...

thx for the post Hamidreza.

I didn't have this file with my system

/etc/resolvconf/run/resolv.conf

also, if anyone's trying it out, make sure to always backup your files before removing them.

eqi said...

thanks for your post

allpopular said...

The basic solution worked for me. Thanks!


--

my blog