Debian

在 debian 中收到錯誤消息“E: Sub-process /usr/bin/dpkg returned an error code (1)”

  • June 18, 2013

我正在嘗試在我的 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

**危險:**如果你真的知道你在做什麼,你可以嘗試註釋掉產生錯誤的行並嘗試再次配置包

dpkg --configure -a

我有一個類似的問題並解決它,我剛剛刪除了目前的 Avahi 配置

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

如果它不存在,請嘗試 avahi-daemon.dpkg-new 而不是 avahi-daemon

然後我只是執行安裝

sudo apt-get -f install avahi-daemon

希望有幫助。

引用自:https://serverfault.com/questions/341852