Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having a problem with installing bind9 on Ubuntu 12.04 LTS. I have installed a Plesk 11 server but DNS service is not running.

root@cp11:~# apt-get install bind
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package bind is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  bind9 dnsutils dnsutils:i386 bind9:i386 manpages

E: Package 'bind' has no installation candidate

root@cp11:~# /etc/init.d/bind9 start
 * Starting domain name service... bind9                                                                                              [fail] 

root@cp11:~# /etc/init.d/bind9 restart
 * Stopping domain name service... bind9                                                                                              [ OK ] 
 * Starting domain name service... bind9                                                                                              [fail] 

When I try to check the log file:

root@cp11:~# tail -f /var/log/messages
tail: cannot open `/var/log/messages' for reading: No such file or directory

I checked in /etc and there is a bind directory

root@cp11:/etc/bind# ls
bind.keys  db.127  db.empty  db.root     named.conf.default-zones  named.conf.options  rndc.key
db.0       db.255  db.local  named.conf  named.conf.local          rndc.conf           zones.rfc1918

When I try to uninstall bind9 it also removes the Plesk control panel.

So I updated and the upgraded the packages and I see bind error:

root@cp11:~# apt-get upgrade
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-3.2.0-23-generic
Processing triggers for resolvconf ...
Processing triggers for python-support ...
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
share|improve this question

Plesk and Apparmor have conflict(s), I am only aware of the conflict between Apparmor's default Bind9 profile and Plesk's configuration. The official documentation says to uninstall Apparmor as it is not supported, I think this is unwise as it discards a fair amount of protection.

You could just adjust the Apparmor profile for bind9, edit /etc/apparmor.d/local/usr.sbin.named and add:

# Allow Plesks configuration for bind9 to run with Apparmor
/var/named/run-root/** rwm,

Then reload Apparmor, and start bind9:

# Reload Apparmor profiles
service apparmor reload
# Start bind9, which should start without error now
service bind9 start

The services management page should now report that bind9 is running, if not, you may need to restart Plesk:

service psa restart

Source: (Disclaimer: I wrote the source, I am not a security expert.)

share|improve this answer
This is the best way to solve this problem. It works very well and allows you to mantain AppArmor running with Plesk and Bind9. – serfer2 Feb 19 '15 at 10:34
up vote 1 down vote accepted

It appears that Plesk conflict with appormour and this results in issues with bind.

So the solution is:

sudo /etc/init.d/apparmor teardown
sudo update-rc.d -f apparmor remove 

Then start bind sudo /etc.init.d/bind9 start


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.