E:subprocess/ usr / bin / dpkg在debian中返回一个错误代码(1)“

我想安装在我的debian服务器的Java,但是当我运行这些命令得到一个错误按摩每一次 –

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: exim4-base exim4-daemon-light exim4 avahi-daemon libnss-mdns x11-common E: Sub-process /usr/bin/dpkg returned an error code (1) 

我正在使用这些命令 –

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

有谁知道我该如何解决这个问题? 谢谢

您可以在/var/lib/dpkg/info生成错误的脚本; 它可能会被命名为avahi-daemon.postinst

危险:如果你真的知道你在做什么,你可以尝试注释产生错误的行,并尝试重新configuration包

 dpkg --configure -a 

我有一个类似的问题,并解决它,我刚刚删除当前的Avahiconfiguration

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

如果不存在,请尝试avahi-daemon.dpkg-new而不是avahi-daemon

然后,我刚刚运行安装

 sudo apt-get -f install avahi-daemon 

希望有所帮助。

所以/etc/init.d/avahi-daemon的LSB头有些问题。 我怀疑这是因为该文件已被修改,使您无法获取此文件的当前打包版本。 我要检查的是比较dpkg认为该文件的当前版本是什么,以及您在文件系统中实际拥有的版本。 这个命令会告诉你当前的打包版本是什么:

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

这应该返回一个md5sum像这样:

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

通过运行md5sum /etc/init.d/avahi-daemon将其与您当前的版本进行比较。 如果这个总和不同于dpkg返回的总和,那实际上是这个问题。 如果是这样,您可以通过告诉dpkg使用以下命令覆盖avahi-daemon软件包的所有conffiles来纠正它:

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

在此之后,尝试runngin dpkg --configure -a ; apt-get -f install dpkg --configure -a ; apt-get -f install来完成待处理的操作。

请注意,这将覆盖avahi的所有configuration。 如果你需要保存一些定制,我们可以谈谈如何做到这一点。

如果md5sums DID匹配,请发布/etc/init.d/avahi-daemon顶部的LSB头,告诉我们dpkg -l avahi-daemon报告的是哪个版本