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

by on November 14, 2010 · 4 comments· LAST UPDATED November 14, 2010

in

When I try to restart my BIND 9 server under Ubuntu Linux using service bind9 restart or service bind9 start command, I get the following error:
resolvconf: Error: /etc/resolv.conf must be a symlink

How do I fix this problem?

You can fix this error by tying the following command (open a terminal and login as root):
$ sudo -i
# cd /etc
# rm resolv.conf
# ln -s /etc/resolvconf/run/resolv.conf .
# service bind9 restart

Postfix Error

If you get the error as follows (postfix error along with the above error):

 * Stopping domain name service... bind9                                                                                                                                                                                              [ OK ]
 * Starting domain name service... bind9
/usr/sbin/postconf: fatal: open /etc/postfix/main.cf: No such file or directory
cp: `/etc/resolv.conf' and `/etc/resolv.conf' are the same file
run-parts: /etc/resolvconf/update-libc.d/postfix exited with return code 1
run-parts: /etc/resolvconf/update.d/libc exited with return code 1

Type the following command:
$ sudo -i
# cd /etc
# mkdir postfix
# touch postfix/main.cf
# rm resolv.conf
# ln -s /etc/resolvconf/run/resolv.conf .
# service bind9 restart

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 4 comments… read them below or add one }

1 guy December 13, 2011 at 11:38 pm

Thanks for the help, the recent bind9 update crashed all the time…

:0)

Reply

2 alwuzomondo July 3, 2012 at 1:21 pm

Thank you for pointing me in the right direction.
On Ubuntu 11.04 server 64bit the command
“ln -s /etc/resolvconf/run/resolv.conf .” should be “ln -s /run/resolv.conf .”
After this bind updates like a charm.

Reply

3 Hillel August 5, 2013 at 8:58 pm

Great!

Reply

4 alwuzomondo July 3, 2012 at 1:38 pm

Thanks for pointing me in the right direction.
On Ubuntu 11.04 64bit server the command “ln -s /etc/resolvconf/run/resolv.conf .”
should be “ln -s /etc/resolvconf/run/resolv.conf .”

Reply

Leave a Comment

Tagged as: , , , , , , , ,

Previous Faq:

Next Faq: