软件包 udev 尚未配置

软件包 udev 尚未配置

今天我决定将我的 Ubuntu Desktop 14.04 LTS 升级到 16.04。不幸的是,升级过程在途中崩溃了,不知道为什么。当我重新启动时,如果我选择 Grub 中的第一个 Ubuntu 选项,则只剩下黑屏。但是,我有一个“高级 Ubuntu 选项”(或类似选项),其中有一堆不同的选项:

Ubuntu
Advanced options for Ubuntu
        Ubuntu, with Linux 4.4.0-28-generic
        Ubuntu, with Linux 4.4.0-28-generic (upstart)
        Ubuntu, with Linux 4.4.0-28-generic (recovery mode)
        Ubuntu, with Linux 4.2.0-41-generic
        Ubuntu, with Linux 4.2.0-41-generic (upstart)
        Ubuntu, with Linux 4.2.0-41-generic (recovery mode)
        Ubuntu, with Linux 4.2.0-38-generic
        Ubuntu, with Linux 4.2.0-38-generic (upstart)
        Ubuntu, with Linux 4.2.0-38-generic (recovery mode)
        Ubuntu, with Linux 4.2.0-36-generic
        Ubuntu, with Linux 4.2.0-36-generic (upstart)
        Ubuntu, with Linux 4.2.0-36-generic (recovery mode)
        Ubuntu, with Linux 4.2.0-35-generic
        Ubuntu, with Linux 4.2.0-35-generic (upstart)
        Ubuntu, with Linux 4.2.0-35-generic (recovery mode)
        Ubuntu, with Linux 4.2.0-34-generic
        Ubuntu, with Linux 4.2.0-34-generic (upstart)
        Ubuntu, with Linux 4.2.0-34-generic (recovery mode)
        Ubuntu, with Linux 4.2.0-30-generic
        Ubuntu, with Linux 4.2.0-30-generic (upstart)
        Ubuntu, with Linux 4.2.0-30-generic (recovery mode)
Memory test (memtest86+)'
Memory test (memtest86+, serial console 115200)
Windows 7 (loader) (on /dev/sda2)
Windows 7 (loader) (on /dev/sda3)

如果我选择前三个中的任何一个(具有最高版本),它都无法启动,我会收到“内核恐慌错误...”。

如果我选择任何后续的 linux 4.xx 选项,它都会启动到登录屏幕,但是当我输入用户名和密码时,屏幕会变黑 1-2 秒,然后返回到登录屏幕。

但是,如果我选择“Upstart”选项,我可以访问系统的无头版本。通过一些配置,我可以连接到互联网,以便尝试更新。不幸的是,当我尝试升级时,我得到了以下信息:

mmv@mmv:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
318 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up udev (229-4ubuntu6) ...
addgroup: The group `input' already exists and is not a system group. Exiting.
dpkg: error processing package udev (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of initramfs-tools-core:
 initramfs-tools-core depends on udev; however:
  Package udev is not configured yet.

dpkg: error processing package initramfs-tools-core (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of initramfs-tools:
 initramfs-tools depends on initramfs-tools-core (= 0.122ubuntu8.1); however:
  Package initramfs-tools-core is not configured yet.

dpkg: error processing package initramfs-tools (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of brltty:
 brltty depends on initramfs-tools (>= 0.40ubuntu30); however:
  Package initramfs-tools is not configured yet.

dpkg: error processing package brltty (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of bluez:
 bluez depends on udev (>= 170-1); however:
  Package udev is not configured yet.

dpkg: error prNo apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                                        No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                                                                                                                                                  No apport report written because MaxReports is reached already
                                                   No apport report written because MaxReports is reached already
                                                                                                                 No apport report written because MaxReports is reached already
                                                                                                                                                                               ocessing package bluez (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of plymouth:
 plymouth depends on initramfs-tools | dracut; however:
  Package initramfs-tools is not configured yet.
  Package dracut is not installed.

dpkg: error processing package plymouth (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of mountall:
 mountall depends on udev; however:
  Package udev is not configured yet.
 mountall depends on plymouth; however:
  Package plymouth is not configured yet.

dpkg: error processing package mountall (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of upstart:
 upstart depends on mountall; however:
  Package mountall is not configured yet.

dpkg: error processing package upstart (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
                                                                                                                            dpkg: dependency problems prevent configuration of apparmor:
 apparmor depends on initramfs-tools | linux-initramfs-tool; however:
  Package initramfs-tools is not configured yet.
  Package linux-initramfs-tool is not installed.
  Package initramfs-tools which provides linux-initramfs-tool is not configured yet.

dpkg: error processing package apparmor (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of lightdm:
 lightdm depends on plymouth (>= 0.8.8-0ubuntu18); however:
  Package plymouth is not configured yet.

dpkg: error processing package lightdm (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of mysql-server-5.7:
 mysql-server-5.7 depends on apparmor (>= 2.10); however:
  Package apparmor is not configured yet.

dpkg: error processing package mysql-server-5.7 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of ubuntu-drivers-common:
 ubuntu-drivers-common depends on udev (>= 204-0ubuntu4~); however:
  Package udev is not configured yet.

dpkg: error processing package ubuntu-drivers-common (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of console-setup:
 console-setup depends on initramfs-tools (>= 0.85eubuntu12) | linux-initramfs-tool; however:
  Package initramfs-tools is not configured yet.
  Package linux-initramfs-tool is not installed.
  Package initramfs-tools which provides linux-initramfs-tool is not configured yet.

dpkg: error processing package console-setup (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of kbd:
 kbd depends on console-setup | console-setup-mini; however:
  Package console-setup is not configured yet.
  Package console-setup-mini is not installed.

dpkg: error processing package kbd (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of console-setup-linux:
 console-setup-linux depends on kbd (>= 1.15-1ubuntu3); however:No apport report written because MaxReports is reached already

  Package kbd is not configured yet.

dpkg: error processing package console-setup-linux (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of plymouth-theme-ubuntu-text:
 plymouth-theme-ubuntu-text depends on plymouth (= 0.9.2-3ubuntu13.1); however:
  Package plymouth is not configured yet.

dpkg: error processing package plymouth-theme-ubuntu-text (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of apparmor-easyprof-ubuntu:
 apparmor-easyprof-ubuntu depends on apparmor (>= 2.9.1-0ubuntu4~); however:
  Package apparmor is not configured yet.

dpkg: error processing package apparmor-easyprof-ubuntu (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of media-player-info:
 media-player-info depends on udev; however:
  Package udev is not configured yet.

dpkg: error processing package media-player-info (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of rhythmbox:
 rhythmbox depends on media-player-info; however:
  Package media-player-info is not configured yet.

dpkg: error processing package rhythmbox (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of rhythmbox-plugin-cdrecorder:
 rhythmbox-plugin-cdrecorder depends on rhythmbox (= 3.3-1ubuntu7); however:
  Package rhythmbox is not configured yet.

dpkg: error processing package rhythmbox-plugin-cdrecorder (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of rhythmbox-plugin-zeitgeist:
 rhythmbox-plugin-zeitgeist depends on rhythmbox (>= 3.3-1ubuntu7); however:
  Package rhythmbox is not configured yet.
 rhythmbox-plugin-zeitgeist depends on rhythmbox (<< 3.4); however:
  Package rhythmbox is not configured yet.

dpkg: error processing package rhythmbox-plugin-zeitgeist (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of rhythmbox-plugins:
 rhythmbox-plugins depends on rhythmbox (= 3.3-1ubuntu7); however:
  Package rhythmbox is not configured yet.

dpkg: error processing package rhythmbox-plugins (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of udisks2:
 udisks2 depends on udev; however:
  Package udev is not configured yet.

dpkg: error processing package udisks2 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of gvfs-daemons:
 gvfs-daemons depends on udisks2; however:
  Package udisks2 is not configured yet.

dpkg: error processing package gvfs-daemons (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of gvfs:amd64:
 gvfs:amd64 depends on gvfs-daemons (>= 1.28.2-1ubuntu1~16.04.1); however:
  Package gvfs-daemons is not configured yet.
 gvfs:amd64 depends on gvfs-daemons (<< 1.28.2-1ubuntu1~16.04.1.1~); however:
  Package gvfs-daemons is not configured yet.

dpkg: error processing package gvfs:amd64 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of nautilus:
 nautilus depends on gvfs (>= 1.3.2); however:
  Package gvfs:amd64 is not configured yet.

dpkg: error processing package nautilus (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of brasero:
 brasero depends on gvfs; however:
  Package gvfs:amd64 is not configured yet.

dpkg: error processing package brasero (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python3-apparmor-click:
 python3-apparmor-click depends on apparmor-easyprof-ubuntu (>= 1.0.17); however:
  Package apparmor-easyprof-ubuntu is not configured yet.

dpkg: error processing package python3-apparmor-click (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of click-apparmor:
 click-apparmor depends on python3-apparmor-click (= 0.3.13.1); however:
  Package python3-apparmor-click is not configured yet.
 click-apparmor depends on apparmor (>= 2.9.1-0ubuntu8~pre8); however:
  Package apparmor is not configured yet.

dpkg: error processing package click-apparmor (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of network-manager:
 network-manager depends on udev; however:
  Package udev is not configured yet.

dpkg: error processing package network-manager (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of indicator-network:
 indicator-network depends on network-manager; however:
  Package network-manager is not configured yet.

dpkg: error processing package indicator-network (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of upower:
 upower depends on udev; however:
  Package udev is not configured yet.

dpkg: error processing package upower (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of indicator-power:
 indicator-power depends on upower; however:
  Package upower is not configured yet.

dpkg: error processing package indicator-power (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of powerd:
 powerd depends on upower; however:
  Package upower is not configured yet.

dpkg: error processing package powerd (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of pulseaudio:
 pulseaudio depends on udev (>= 143); however:
  Package udev is not configured yet.

dpkg: error processing package pulseaudio (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of indicator-sound:
 indicator-sound depends on pulseaudio; however:
  Package pulseaudio is not configured yet.

dpkg: error processing package indicator-sound (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of gnome-bluetooth:
 gnome-bluetooth depends on bluez (>= 5.5); however:
  Package bluez is not configured yet.
 gnome-bluetooth depends on udev (>= 154); however:
  Package udev is not configured yet.

dpkg: error processing package gnome-bluetooth (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of indicator-bluetooth:
 indicator-bluetooth depends on bluez (>= 5); however:
  Package bluez is not configured yet.

dpkg: error processing package indicator-bluetooth (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of unity-control-center:
 unity-control-center depends on indicator-bluetooth; however:
  Package indicator-bluetooth is not configured yet.
 unity-control-center depends on indicator-power; however:
  Package indicator-power is not configured yet.
 unity-control-center depends on indicator-sound; however:
  Package indicator-sound is not configured yet.

dpkg: error processing package unity-control-center (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of ubuntu-system-settings:
 ubuntu-system-settings depends on bluez (>= 5.23); however:
  Package bluez is not configured yet.
 ubuntu-system-settings depends on indicator-bluetooth (>> 0.0.6+13.10.20131010); however:
  Package indicator-bluetooth is not configured yet.
 ubuntu-system-settings depends on indicator-network (>= 0.7.1); however:
  Package indicator-network is not configured yet.
 ubuntu-system-settings depends on indicator-power (>= 12.10.6+15.04.20150130); however:
  Package indicator-power is not configured yet.
 ubuntu-system-settings depends on powerd (>= 0.15) | gnome-settings-daemon; however:
  Package powerd is not configured yet.
  Package gnome-settings-daemon is not installed.

dpkg: error processing package ubuntu-system-settings (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of network-manager-gnome:
 network-manager-gnome depends on network-manager (>= 1.1); however:
  Package network-manager is not configured yet.

dpkg: error processing package network-manager-gnome (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of cryptsetup:
 cryptsetup depends on initramfs-tools (>= 0.91) | linux-initramfs-tool; however:
  Package initramfs-tools is not configured yet.
  Package linux-initramfs-tool is not installed.
  Package initramfs-tools which provides linux-initramfs-tool is not configured yet.
 cryptsetup depends on plymouth; however:
  Package plymouth is not configured yet.

dpkg: error processing package cryptsetup (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of gvfs-backends:
 gvfs-backends depends on gvfs (= 1.28.2-1ubuntu1~16.04.1); however:
  Package gvfs:amd64 is not configured yet.
 gvfs-backends depends on gvfs-daemons (= 1.28.2-1ubuntu1~16.04.1); however:
  Package gvfs-daemons is not configured yet.

dpkg: error processing package gvfs-backends (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of deja-dup-backend-gvfs:
 deja-dup-backend-gvfs depends on gvfs-backends; however:
  Package gvfs-backends is not configured yet.

dpkg: error processing package deja-dup-backend-gvfs (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of gvfs-fuse:
 gvfs-fuse depends on gvfs (= 1.28.2-1ubuntu1~16.04.1); however:
  Package gvfs:amd64 is not configured yet.

dpkg: error processing package gvfs-fuse (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of linux-image-4.4.0-28-generic:
 linux-image-4.4.0-28-generic depends on initramfs-tools | linux-initramfs-tool; however:
  Package initramfs-tools is not configured yet.
  Package linux-initramfs-tool is not installed.
  Package initramfs-tools which provides linux-initramfs-tool is not configured yet.

dpkg: error processing package linux-image-4.4.0-28-generic (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-28-generic:
 linux-image-extra-4.4.0-28-generic depends on linux-image-4.4.0-28-generic; however:
  Package linux-image-4.4.0-28-generic is not configured yet.

dpkg: error processing package linux-image-extra-4.4.0-28-generic (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-4.4.0-28-generic; however:
  Package linux-image-4.4.0-28-generic is not configured yet.
 linux-image-generic depends on linux-image-extra-4.4.0-28-generic; however:
  Package linux-image-extra-4.4.0-28-generic is not configured yet.

dpkg: error processing package linux-image-generic (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of linux-generic:
 linux-generic depends on linux-image-generic (= 4.4.0.28.30); however:
  Package linux-image-generic is not configured yet.

dpkg: error processing package linux-generic (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of linux-generic-lts-wily:
 linux-generic-lts-wily depends on linux-generic; however:
  Package linux-generic is not configured yet.

dpkg: error processing package linux-generic-lts-wily (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.7; however:
  Package mysql-server-5.7 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: too many errors, stopping
Errors were encountered while processing:
 udev
 initramfs-tools-core
 initramfs-tools
 brltty
 bluez
 plymouth
 mountall
 upstart
 apparmor
 lightdm
 mysql-server-5.7
 ubuntu-drivers-common
 console-setup
 kbd
 console-setup-linux
 plymouth-theme-ubuntu-text
 apparmor-easyprof-ubuntu
 media-player-info
 rhythmbox
 rhythmbox-plugin-cdrecorder
 rhythmbox-plugin-zeitgeist
 rhythmbox-plugins
 udisks2
 gvfs-daemons
 gvfs:amd64
 nautilus
 brasero
 python3-apparmor-click
 click-apparmor
 network-manager
 indicator-network
 upower
 indicator-power
 powerd
 pulseaudio
 indicator-sound
 gnome-bluetooth
 indicator-bluetooth
 unity-control-center
 ubuntu-system-settings
 network-manager-gnome
 cryptsetup
 gvfs-backends
 deja-dup-backend-gvfs
 gvfs-fuse
 linux-image-4.4.0-28-generic
 linux-image-extra-4.4.0-28-generic
 linux-image-generic
 linux-generic
 linux-generic-lts-wily
 mysql-server
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

我也尝试了以下命令,但出现相同的“udev”错误。

   14  sudo apt-get clean
   15  sudo apt-get autoremove
   16  sudo apt-get update
   17  sudo apt-get upgrade
   18  sudo dpkg --configure -a
   19  sudo apt-get install -f
   20  sudo apt-get --purge remove udev
   21  sudo apt-get update
   22  sudo apt-get clean
   23  sudo apt-get autoremove
   24  sudo apt-get autoremove -f
   25  sudo apt-get update
   26  sudo apt-get upgrade
   27  sudo apt-get upgrade -f
   28  sudo apt-get download udev
   30  sudo dpkg -i --force-confmiss udev_229-4ubuntu6_amd64.deb
   31  sudo apt-get install udev
   33  sudo apt-get install -f

有任何想法吗?

答案1

udev 安装后脚本有错误

addgroup: The group `input' already exists and is not a system group. Exiting.
dpkg: error processing package udev (--configure):
subprocess installed post-installation script returned error exit status 1

其他软件包正在等待 udev 完成

 initramfs-tools-core depends on udev; however:
  Package udev is not configured yet.
...
 initramfs-tools depends on initramfs-tools-core (= 0.122ubuntu8.1); however:
  Package initramfs-tools-core is not configured yet.
  1. 因此只需使用以下命令即可跳过该脚本

    sudo mv /var/lib/dpkg/info/udev.postinst /var/lib/dpkg/info/udev.postinst.backup
    
  2. 然后命令下面的继续之前的安装。

    sudo apt-get install -f
    

应该没问题,只是脚本不够健壮,无法预料到某些罕见的情况。完成后复制回该脚本。

sudo mv /var/lib/dpkg/info/udev.postinst.backup /var/lib/dpkg/info/udev.postinst

答案2

所以不要惊慌,深呼吸

首先备份 udev.postinst

sudo mv /var/lib/dpkg/info/udev.postinst /var/lib/dpkg/info/udev.postinst.backup

然后安装 udev

sudo  apt-get install udev

在那之后

sudo  dpkg --configure -a

现在

sudo apt-get install -f

都完成了,现在放松一下,喝杯咖啡

答案3

apt-get --purge 删除 udev

进入

1

apt-get 升级

自动删除

然后它应该非常好

相关内容