14.10 - 软件更新程序 - 软件包操作失败 - 无法更新任何 apt 软件包 - 完全阻止

14.10 - 软件更新程序 - 软件包操作失败 - 无法更新任何 apt 软件包 - 完全阻止

我正在使用 14.10 Ubuntu。软件更新程序失败,并出现以下错误:

包操作失败

从终端尝试做

sudo apt-get update
sudo apt-get dist-upgrade

这会出现以下错误:

➜  ~  sudo apt-get dist-upgrade                  
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... The following packages were automatically installed and are no longer required:
  libcdr-0.1-1 libcgmanager0:i386 libcmis-0.4-4 libfox-1.6-0 libmspub-0.1-1 libvisio-0.1-1 xarchiver
Use 'apt-get autoremove' to remove them.
Done
The following packages will be upgraded:
  cgmanager git git-core git-man gnome-session gnome-session-bin gnome-session-common libapache2-mod-php5 libblkid1 libcgmanager0 libcgmanager0:i386 libmount1 libsmartcols1
  libunity-settings-daemon1 libuuid1 libuuid1:i386 openjdk-7-jre:i386 openjdk-7-jre-headless:i386 php5 php5-cli php5-common php5-gd php5-mysql php5-readline ubuntu-session
  unity-settings-daemon usb-creator-common usb-creator-gtk uuid-runtime
29 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
5 not fully installed or removed.
Need to get 0 B/53.4 MB of archives.
After this operation, 16.4 kB disk space will be freed.
Do you want to continue? [Y/n] Y
Setting up util-linux (2.25.1-3ubuntu4.1) ...
insserv: warning: script 'sav-web' missing LSB tags and overrides
insserv: warning: script 'sav-protect' missing LSB tags and overrides
insserv: warning: script 'sav-rms' missing LSB tags and overrides
insserv: There is a loop between service minidlna and sav-web if stopped
insserv:  loop involving service sav-web at depth 2
insserv:  loop involving service minidlna at depth 1
insserv: Stopping sav-web depends on minidlna and therefore on system facility `$all' which can not be true!
insserv: Stopping sav-protect depends on minidlna and therefore on system facility `$all' which can not be true!
insserv: Stopping sav-rms depends on minidlna and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package util-linux (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 util-linux
E: Sub-process /usr/bin/dpkg returned an error code (1)

它完全阻止了一切。我现在无法安装/更新/删除任何 apt 包。根本原因似乎是(我的猜测):

insserv: warning: script 'sav-web' missing LSB tags and overrides
insserv: warning: script 'sav-protect' missing LSB tags and overrides
insserv: warning: script 'sav-rms' missing LSB tags and overrides
insserv: There is a loop between service minidlna and sav-web if stopped
insserv:  loop involving service sav-web at depth 2
insserv:  loop involving service minidlna at depth 1
insserv: Stopping sav-web depends on minidlna and therefore on system facility `$all' which can not be true!
insserv: Stopping sav-protect depends on minidlna and therefore on system facility `$all' which can not be true!
insserv: Stopping sav-rms depends on minidlna and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!

尝试了以下操作,也得到了相同的输出:

sudo apt-get -f install  

尝试过

➜  ~  sudo dpkg --configure -a                  
Setting up ntp (1:4.2.6.p5+dfsg-3ubuntu2.14.10.3) ...
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
insserv: warning: script 'sav-web' missing LSB tags and overrides
insserv: warning: script 'sav-protect' missing LSB tags and overrides
insserv: warning: script 'sav-rms' missing LSB tags and overrides
insserv: There is a loop between service minidlna and sav-web if stopped
insserv:  loop involving service sav-web at depth 2
insserv:  loop involving service minidlna at depth 1
insserv: Stopping sav-web depends on minidlna and therefore on system facility `$all' which can not be true!
insserv: Stopping sav-protect depends on minidlna and therefore on system facility `$all' which can not be true!
insserv: Stopping sav-rms depends on minidlna and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package ntp (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up mongodb-server (1:2.6.3-0ubuntu5) ...
insserv: warning: script 'sav-web' missing LSB tags and overrides
insserv: warning: script 'sav-protect' missing LSB tags and overrides
insserv: warning: script 'sav-rms' missing LSB tags and overrides
insserv: There is a loop between service minidlna and sav-web if stopped
insserv:  loop involving service sav-web at depth 2
insserv:  loop involving service minidlna at depth 1
insserv: Stopping sav-web depends on minidlna and therefore on system facility `$all' which can not be true!
insserv: Stopping sav-protect depends on minidlna and therefore on system facility `$all' which can not be true!
insserv: Stopping sav-rms depends on minidlna and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package mongodb-server (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up util-linux (2.25.1-3ubuntu4.1) ...
insserv: warning: script 'sav-web' missing LSB tags and overrides
insserv: warning: script 'sav-protect' missing LSB tags and overrides
insserv: warning: script 'sav-rms' missing LSB tags and overrides
insserv: There is a loop between service minidlna and sav-web if stopped
insserv:  loop involving service sav-web at depth 2
insserv:  loop involving service minidlna at depth 1
insserv: Stopping sav-web depends on minidlna and therefore on system facility `$all' which can not be true!
insserv: Stopping sav-protect depends on minidlna and therefore on system facility `$all' which can not be true!
insserv: Stopping sav-rms depends on minidlna and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package util-linux (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up apport (2.14.7-0ubuntu8.4) ...
insserv: warning: script 'sav-web' missing LSB tags and overrides
insserv: warning: script 'sav-protect' missing LSB tags and overrides
insserv: warning: script 'sav-rms' missing LSB tags and overrides
insserv: There is a loop between service minidlna and sav-web if stopped
insserv:  loop involving service sav-web at depth 2
insserv:  loop involving service minidlna at depth 1
insserv: Stopping sav-web depends on minidlna and therefore on system facility `$all' which can not be true!
insserv: Stopping sav-protect depends on minidlna and therefore on system facility `$all' which can not be true!
insserv: Stopping sav-rms depends on minidlna and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package apport (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of apport-gtk:
 apport-gtk depends on apport (>= 0.41); however:
  Package apport is not configured yet.

dpkg: error processing package apport-gtk (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 ntp
 mongodb-server
 util-linux
 apport
 apport-gtk

答案1

一个问题是,sav-*输出中提到的脚本似乎缺少 LSB 标头。如果这是 Sophos Antivirus 的东西,最好向 Sophos 咨询。如果其他方法都失败了,请尝试手动将 LSB 标签添加到/etc/init.d/sav-web其他两个。

答案2

追溯到 minidlna 和 sophos Anti virus 之间的冲突(仍然不知道为什么它们在 apt 更新时会陷入循环),卸载了 sophos使用

sudo sh /opt/sophos-av/uninstall.sh

现在我可以继续了。希望它能帮助其他面临此问题的人。

相关内容