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

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 4 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
4 comments… add one
  • guy Dec 13, 2011 @ 23:38

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


  • alwuzomondo Jul 3, 2012 @ 13:21

    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.

    • Hillel Aug 5, 2013 @ 20:58


  • alwuzomondo Jul 3, 2012 @ 13:38

    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 .”

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum