16.04 LTS 更新失败 - 处理 util-linux 时遇到错误

16.04 LTS 更新失败 - 处理 util-linux 时遇到错误

最近,任何尝试更新我的 16.04 安装的尝试都失败了,并出现与 util-linux 相关的错误。我似乎无法更新或安装任何软件包。以下是我尝试的命令及其返回的结果。

首先我跑...

sudo apt-get update

返回...

Hit:1 http://gb.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://archive.canonical.com/ubuntu xenial InRelease          
Hit:3 http://security.ubuntu.com/ubuntu xenial-security InRelease   
Hit:4 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease
Hit:5 http://gb.archive.ubuntu.com/ubuntu xenial-updates InRelease  
Hit:6 http://gb.archive.ubuntu.com/ubuntu xenial-backports InRelease
Reading package lists... Done  

然后就跑了...

sudo apt-get clean

该命令没有输出。

接下来我跑了……

sudo apt-get autoremove

返回(我已删除多次重复的块)...

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 122 not to upgrade.
6 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up util-linux (2.27.1-6ubuntu3.2) ...
insserv: warning: script 'K01smfpd' missing LSB tags and overrides
insserv: warning: script 'smfpd' missing LSB tags and overrides
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: There is a loop between service smfpd and rc.local if started
insserv:  loop involving service rc.local at depth 7
insserv:  loop involving service smfpd at depth 1
insserv: Starting smfpd depends on rc.local 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
dpkg: dependency problems prevent configuration of udev:
udev depends on util-linux (>= 2.27.1); however:
Package util-linux is not configured yet.

dpkg: error processing package udev (--configure):
dependency problems - leaving unconfigured
Setting up dbus (1.10.6-1ubuntu3.3) ...
No apport report written because the error message indicates it's a follow-up error from a previous failure.
                        A reboot is required to replace the running dbus-daemon.
Please reboot the system when convenient.
insserv: warning: script 'K01smfpd' missing LSB tags and overrides
insserv: warning: script 'smfpd' missing LSB tags and overrides
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: There is a loop between service smfpd and rc.local if started
insserv:  loop involving service rc.local at depth 7
insserv:  loop involving service smfpd at depth 1
insserv: Starting smfpd depends on rc.local 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 dbus (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of libpam-systemd:amd64:
libpam-systemd:amd64 depends on dbus; however:
Package dbus is not configured yet.

dpkg: error processing package libpam-systemd:amd64 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of dbus-x11:
dbus-x11 depends on dbus; however:
Package dbus is not configured yet.

dpkg: error processing package dbus-x11 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent processing triggers for gconf2:
gconf2 depends on dbus-x11; however:
Package dbus-x11 is not configured yet.

dpkg: error processing package gconf2 (--configure):
dependency problems - leaving triggers unprocessed
dpkg: dependency problems prevent processing triggers for gconf2:
gconf2 depends on dbus-x11; however:
Package dbuNo apport report written because MaxReports has already been reached
No apport report written because MaxReports has already been reached

dpkg: error processing package gconf2 (--configure):
dependency problems - leaving triggers unprocessed
dpkg: too many errors, stopping
Errors were encountered while processing:
util-linux
udev
dbus
libpam-systemd:amd64
dbus-x11
gconf2
... repeated many time
gconf2
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

我运行的下一个命令是......

sudo apt-get update && sudo apt-get upgrade

返回...

Hit:1 http://gb.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://archive.canonical.com/ubuntu xenial InRelease          
Hit:3 http://security.ubuntu.com/ubuntu xenial-security InRelease   
Hit:4 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease
Hit:5 http://gb.archive.ubuntu.com/ubuntu xenial-updates InRelease  
Hit:6 http://gb.archive.ubuntu.com/ubuntu xenial-backports InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
linux-generic linux-headers-generic linux-image-generic
The following packages will be upgraded:
appmenu-qt5 apport apport-gtk appstream apt apt-transport-https apt-utils
base-files bsdutils console-setup console-setup-linux firefox
firefox-locale-en gir1.2-gst-plugins-base-1.0 gir1.2-gstreamer-1.0
gir1.2-javascriptcoregtk-4.0 gir1.2-webkit2-4.0 grub-common grub-pc
grub-pc-bin grub2-common gstreamer1.0-alsa gstreamer1.0-libav
gstreamer1.0-plugins-bad gstreamer1.0-plugins-bad-faad
gstreamer1.0-plugins-bad-videoparsers gstreamer1.0-plugins-base
gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-good
gstreamer1.0-plugins-ugly gstreamer1.0-plugins-ugly-amr
gstreamer1.0-pulseaudio gstreamer1.0-tools gstreamer1.0-x
humanity-icon-theme im-config indicator-application keyboard-configuration
klibc-utils krb5-locales libappstream3 libapt-inst2.0 libapt-pkg5.0
libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2
libegl1-mesa libfcitx-config4 libfcitx-gclient0 libfcitx-utils0 libfdisk1
libgbm1 libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libgles1-mesa
libgles2-mesa libglib2.0-0 libglib2.0-bin libglib2.0-data
libgnutls-openssl27 libgnutls30 libgssapi-krb5-2
libgstreamer-plugins-bad1.0-0 libgstreamer-plugins-base1.0-0
libgstreamer-plugins-good1.0-0 libgstreamer1.0-0 libhogweed4 libido3-0.1-0
libjavascriptcoregtk-4.0-18 libk5crypto3 libklibc libkrb5-3 libkrb5support0
libmount1 libnettle6 liboxideqt-qmlplugin liboxideqtcore0 liboxideqtquick0
libpulse-mainloop-glib0 libpulse0 libpulsedsp libsmartcols1 libssl1.0.0
libwayland-egl1-mesa libwebkit2gtk-4.0-37 libwebkit2gtk-4.0-37-gtk2
libwxbase3.0-0v5 libwxgtk3.0-0v5 libxatracker2 libxpm4 linux-firmware
linux-libc-dev mesa-vdpau-drivers mount nano ntfs-3g openssl os-prober
oxideqt-codecs-extra pulseaudio pulseaudio-module-bluetooth
pulseaudio-module-x11 pulseaudio-utils python3-apport python3-distupgrade
python3-problem-report qml-module-ubuntu-web snap-confine snapd sudo
ubuntu-core-launcher ubuntu-release-upgrader-core
ubuntu-release-upgrader-gtk uuid-runtime webapp-container webbrowser-app
119 to upgrade, 0 to newly install, 0 to remove and 3 not to upgrade.
6 not fully installed or removed.
Need to get 41.3 MB/187 MB of archives.
After this operation, 3,237 kB disk space will be freed.
Do you want to continue? [Y/n] Y       

Get:1 http://gb.archive.ubuntu.com/ubuntu xenial-updates/main amd64 ubuntu-release-upgrader-gtk all 1:16.04.21 [9,334 B]

<Please note that I don't have the reputation to post all of the get links>

Get:98 http://gb.archive.ubuntu.com/ubuntu xenial-updates/main amd64 appmenu-qt5 amd64 0.3.0+16.04.20151130-0ubuntu2 [95.7 kB]
Fetched 41.3 MB in 1min 58s (349 kB/s)                                         
Extract templates from packages: 100%
Preconfiguring packages ...
Setting up util-linux (2.27.1-6ubuntu3.2) ...
insserv: warning: script 'K01smfpd' missing LSB tags and overrides
insserv: warning: script 'smfpd' missing LSB tags and overrides
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: There is a loop between service smfpd and rc.local if started
insserv:  loop involving service rc.local at depth 7
insserv:  loop involving service smfpd at depth 1
insserv: Starting smfpd depends on rc.local 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)

下一个命令是...

sudo dpkg --configure -a

返回...

dpkg: dependency problems prevent configuration of udev:
udev depends on util-linux (>= 2.27.1); however:
Package util-linux is not configured yet.

dpkg: error processing package udev (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent processing triggers for systemd:
systemd depends on util-linux (>= 2.27.1); however:
Package util-linux is not configured yet.

dpkg: error processing package systemd (--configure):
dependency problems - leaving triggers unprocessed
Setting up dbus (1.10.6-1ubuntu3.3) ...
A reboot is required to replace the running dbus-daemon.
Please reboot the system when convenient.
insserv: warning: script 'K01smfpd' missing LSB tags and overrides
insserv: warning: script 'smfpd' missing LSB tags and overrides
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: There is a loop between service smfpd and rc.local if started
insserv:  loop involving service rc.local at depth 7
insserv:  loop involving service smfpd at depth 1
insserv: Starting smfpd depends on rc.local 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 dbus (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of libpam-systemd:amd64:
libpam-systemd:amd64 depends on dbus; however:
Package dbus is not configured yet.

dpkg: error processing package libpam-systemd:amd64 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of dbus-x11:
dbus-x11 depends on dbus; however:
Package dbus is not configured yet.

dpkg: error processing package gconf2 (--configure):
dependency problems - leaving triggers unprocessed
dpkg: dependency problems prevent processing triggers for gconf2:
gconf2 depends on dbus-x11; however:
Package dbus-x11 is not configured yet.

<this block repeated many times>

dpkg: error processing package gconf2 (--configure):
dependency problems - leaving triggers unprocessed
dpkg: dependency problems prevent processing triggers for gconf2:
gconf2 depends on dbus-x11; however:
Package dbus-x11 is not configured yet.

dpkg: error processing package gconf2 (--configure):
dependency problems - leaving triggers unprocessed
dpkg: too many errors, stopping
Errors were encountered while processing:
udev
systemd
dbus
libpam-systemd:amd64
dbus-x11
gconf2
  repeated many times
gconf2
Processing was halted because there were too many errors.

最后我跑了...

sudo apt-get install -f

返回...

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 122 not to upgrade.
6 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up util-linux (2.27.1-6ubuntu3.2) ...
insserv: warning: script 'K01smfpd' missing LSB tags and overrides
insserv: warning: script 'smfpd' missing LSB tags and overrides
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: There is a loop between service smfpd and rc.local if started
insserv:  loop involving service rc.local at depth 7
insserv:  loop involving service smfpd at depth 1
insserv: Starting smfpd depends on rc.local 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
dpkg: dependency problems prevent configuration of udev:
 udev depends on util-linux (>= 2.27.1); however:
  Package util-linux is not configured yet.

dpkg: error processing package udev (--configure):
 dependency problems - leaving unconfigured
Setting up dbus (1.10.6-1ubuntu3.3) ...
No apport report written because the error message indicates it's a follow-up error from a previous failure.
                        A reboot is required to replace the running dbus-daemon.
Please reboot the system when convenient.
insserv: warning: script 'K01smfpd' missing LSB tags and overrides
insserv: warning: script 'smfpd' missing LSB tags and overrides
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting smfpd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: There is a loop between service smfpd and rc.local if started
insserv:  loop involving service rc.local at depth 7
insserv:  loop involving service smfpd at depth 1
insserv: Starting smfpd depends on rc.local 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 dbus (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of libpam-systemd:amd64:
 libpam-systemd:amd64 depends on dbus; however:
  Package dbus is not configured yet.

dpkg: error processing package libpam-systemd:amd64 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports has already been reached
   dpkg: dependency problems prevent configuration of dbus-x11:
 dbus-x11 depends on dbus; however:
  Package dbus is not configured yet.

No apport report written because MaxReports has already been reached
   dpkg: error processing package dbus-x11 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent processing triggers for gconf2:
 gconf2 depends on dbus-x11; however:
   Package dbus-x11 is not configured yet.

dpkg: error processing package gconf2 (--configure):
 dependency problems - leaving triggers unprocessed
No apport report written because MaxReports has already been reached
   dpkg: dependency problems prevent processing triggers for gconf2:

<this block repeated many times>                                                                    

 gconf2 depends on dbus-x11; however:
  Package dbus-x11 is not configured yet.

dpkg: error processing package gconf2 (--configure):
 dependency problems - leaving triggers unprocessed
No apport report written because MaxReports has already been reached
   dpkg: dependency problems prevent processing triggers for gconf2:
 gconf2 depends on dbus-x11; however:
  Package dbus-x11 is not configured yet.

dpkg: error processing package gconf2 (--configure):
dependency problems - leaving triggers unprocessed
dpkg: too many errors, stopping
No apport report written because MaxReports has already been reached
Errors were encountered while processing:
util-linux
udev
dbus
libpam-systemd:amd64
dbus-x11
gconf2
  <repeated many times>
gconf2

任何帮助、建议、想法或猜测都将受到感激。

答案1

原来,我为了解决邻居的打印机问题而加载的三星打印机驱动程序才是导致我所有问题的根源。这应该会让我学到如何帮助别人 ;-)

线索就是这句话...

insserv: warning: script 'K01smfpd' missing LSB tags and overrides

这让我想到了打印机。顺便说一下,我下载并安装的驱动程序UnifiedLinuxDriver_1.00.tar.gz幸运地包含了一个uninstall.sh脚本。

相关内容