Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 trying to install java in my debian server but when I am running any of these command getting an error massage every time that is -

insserv: Starting tomcat depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Starting tomcat depends on rmnologin and therefore on system facility `$all' which can not be true!
insserv: Max recursions depth 99 reached
insserv:  loop involving service resolvconf at depth 10
insserv:  loop involving service checkfs at depth 8
insserv: There is a loop between service tomcat and checkroot if started
insserv: There is a loop between service rmnologin and mountdevsubfs if started
insserv: There is a loop between service tomcat and resolvconf if started
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing x11-common (--configure):
 subprocess installed post-installation script returned error exit status 1
configured to not write apport reports
                                      Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

I am using these command-

apt-get upgrade --show-upgraded
apt-get install openjdk-6-jdk
apt-get install sun-java6-jdk

Is any one know how can I solve this problem? Thx

share|improve this question
try to update your repos by : apt-get update and then try to fix some old installs that seems to be broken with : apt-get install -f – m0ntassar Dec 17 '11 at 8:57
I tried still its not giving error massage. – Khoyendra Pande Dec 17 '11 at 9:34
I guess you mean an error message. I have no idea about what might be an "error massage" but it would certainly be off topic in serverfault ;-) – jlliagre Dec 18 '11 at 7:35
I am getting "E: Sub-process /usr/bin/dpkg returned an error code (1)" error so I think its not the off topic of serverfault. – Khoyendra Pande Dec 18 '11 at 10:46
"Message" with an "E" and Massage with an "A" are quite different words. – jlliagre Dec 18 '11 at 21:23
up vote 1 down vote accepted

You can look for the script generating the error under /var/lib/dpkg/info; it will probably be named avahi-daemon.postinst.

Dangerous: if you really know what you are doing, you can try commenting out the line(s) which generate the error and try configuring the packages again with

dpkg --configure -a
share|improve this answer
not following which line I would need to comment. – Khoyendra Pande Dec 18 '11 at 10:51

I had a similar problem and to solve it, I just deleted the current Avahi config

sudo rm /etc/init.d/avahi-daemon

If it doesn't exist try avahi-daemon.dpkg-new instead of avahi-daemon

I then just ran the install

sudo apt-get -f install avahi-daemon

Hope that helps.

share|improve this answer

So something is wrong with the LSB header in /etc/init.d/avahi-daemon. I would suspect it is because that file has be modified, preventing you from getting the current packaged version of this file. What I'd have you check is to compare what dpkg thinks the current version of this file is, with the version you actually have in the file system. This command will tell you what the current packaged version is:

dpkg -s avahi-daemon | grep /etc/init.d/avahi-daemon

This should return an md5sum something like this:

/etc/init.d/avahi-daemon 3c6d0943a969795d08675ad16ac74f62

Compare that to the version you currently have by running md5sum /etc/init.d/avahi-daemon. If this sum differs than the one returned by dpkg, this is, in fact, the problem. If so, you can correct it by telling dpkg to overwrite all of the conffiles for the avahi-daemon package with the following command:

apt-get -o DPkg::Options::="--force-confnew" --reinstall install avahi-daemon

After this, try runngin dpkg --configure -a ; apt-get -f install to complete the pending actions.

Note that this will overwrite all the configuration for avahi. If you have some customization you need to save, we can talk about how to do that.

If the md5sums DID match, then please post the LSB header from the top of /etc/init.d/avahi-daemon and tell us what version is reported by dpkg -l avahi-daemon

share|improve this answer
I have checked both are same by first command means by "dpkg" I am getting ====> /etc/init.d/avahi-daemon 619eb9412486f8e39c309bcbe128950d and by second command means by "md5sum" I am getting ====>619eb9412486f8e39c309bcbe128950d /etc/init.d/avahi-daemon So I am thinking both are same – Khoyendra Pande Dec 17 '11 at 13:23
what version of avahi-daemon is installed? – stew Dec 17 '11 at 14:06
how may I check this? – Khoyendra Pande Dec 18 '11 at 10:44

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.