从 10.10 升级到 12.10 后出现依赖问题

从 10.10 升级到 12.10 后出现依赖问题

将 Ubuntu Server 10.10 发行版升级到 12.10 后,我在尝试安装任何程序时收到错误消息。

当我跑步时apt-get install firefox

我的输出是:

Reading package lists... Done
Building dependency tree
Reading state information... Done
firefox is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
22 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up initscripts (2.88dsf-13.10ubuntu11.1) ...
mkdir: cannot create directory `/dev/shm': File exists
dpkg: error processing initscripts (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of procps:
 procps depends on initscripts; however:
  Package initscripts is not configured yet.
dpkg: error processing procps (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of udev:
 udev depends on procps; however:
  Package procps is not configured yet.
dpkg: error processing udev (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of dmsetup:
 dmsetup depends on udev (>> 141-2); however:
  Package udev is not configured yet.
dpkg: error processing dmsetup (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of netbase:
 netbase depends on initscripts; however:
  Package initscripts is not configNo 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 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 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 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 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 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.
                           ured yet.
dpkg: error processing netbase (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of dbus:
 dbus depends on netbase (>= 4.45ubuntu3); however:
  Package netbase is not configured yet.
dpkg: error processing dbus (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of consolekit:
 consolekit depends on dbus (>= 1.1.2); however:
  Package dbus is not configured yet.
dpkg: error processing consolekit (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ifupdown:
 ifupdown depends on initscripts (>= 2.88dsf-13.3); however:
  Package initscripts is not configured yet.
dpkg: error processing ifupdown (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of apache2.2-common:
 apache2.2-common depends on procps; however:
  Package procps is not configured yet.
dpkg: erroNo 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 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 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 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 the error message indicates its a followup error from a previous failure.
    r processing apache2.2-common (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of apache2-mpm-prefork:
 apache2-mpm-prefork depends on apache2.2-common (= 2.2.22-1ubuntu1.4); however:
  Package apache2.2-common is not configured yet.
dpkg: error processing apache2-mpm-prefork (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of apache2:
 apache2 depends on apache2-mpm-worker (= 2.2.22-1ubuntu1.4) | apache2-mpm-prefork (= 2.2.22-1ubuntu1.4) | apache2-mpm-event (= 2.2.22-1ubuntu1.4) | apache2-mpm-itk (= 2.2.22-1ubuntu1.4); however:
  Package apache2-mpm-worker is not installed.
  Package apache2-mpm-prefork is not configured yet.
  Package apache2-mpm-event is not installed.
  Package apache2-mpm-itk is not installed.
 apache2 depends on apache2.2-common (= 2.2.22-1ubuntu1.4); however:
  Package apache2.2-common is not configured yet.
dpkg: error processing apache2 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of bind9:
 bind9 depends on netbase; however:
  Package netbase is not configured yet.
dpkg: error processing bind9 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of cryptsetup:
 cryptsetup depends on dmsetup; however:
  Package dmsetup is not configured yet.
dpkg: error processing cryptsetup (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openssh-server:
 openssh-server depends on procps; however:
  Package procps is not configured yet.
dpkg: error processing openssh-server (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of policykit-1:
 policykit-1 depends on consolekit; however:
  Package consolekit is not configured yet.
 policykit-1 depends on dbus; however:
  Package dbus is not configured yet.
dpkg: error processing policykit-1 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of samba:
 samba depends on procps; however:
  Package procps is not configured yet.
dpkg: error processing samba (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-aptdaemon:
 python-aptdaemon depends on policykit-1; however:
  Package policykit-1 is not configured yet.
dpkg: error processing python-aptdaemon (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of aptdaemon:
 aptdaemon depends on python-aptdaemon (= 0.43+bzr805-0ubuntu9); however:
  Package python-aptdaemon is not configured yet.
dpkg: error processing aptdaemon (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of xul-ext-ubufox:
 xul-ext-ubufox depends on aptdaemon; however:
  Package aptdaemon is not configured yet.
dpkg: error processing xul-ext-ubufox (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libdevmapper1.02.1:
 libdevmapper1.02.1 depends on dmsetup (>= 2:1.02.48-4ubuntu7.3); however:
  Package dmsetup is not configured yet.
dpkg: error processing libdevmapper1.02.1 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libcryptsetup4:
 libcryptsetup4 depends on libdevmapper1.02.1 (>= 2:1.02.36); however:
  Package libdevmapper1.02.1 is not configured yet.
dpkg: error processing libcryptsetup4 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of cryptsetup-bin:
 cryptsetup-bin depends on libcryptsetup4 (>= 2:1.4); however:
  Package libcryptsetup4 is not configured yet.
dpkg: error processing cryptsetup-bin (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 initscripts
 procps
 udev
 dmsetup
 netbase
 dbus
 consolekit
 ifupdown
 apache2.2-common
 apache2-mpm-prefork
 apache2
 bind9
 cryptsetup
 openssh-server
 policykit-1
 samba
 python-aptdaemon
 aptdaemon
 xul-ext-ubufox
 libdevmapper1.02.1
 libcryptsetup4
 cryptsetup-bin
E: Sub-process /usr/bin/dpkg returned an error code (1)

我对 Linux 还很陌生,因此希望答案尽可能简单,并解释什么是什么以及为什么。

用于升级发行版的命令是:

sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
sudo apt-get update && sudo apt-get dist-upgrade
sudo apt-get update && sudo apt-get upgrade & sudo apt-get autoremove
sudo do-release-upgrade

如需进一步信息,请询问。

答案1

首先,您无法从 10.10 升级到 12.10。您应该先升级到 11.04、11.10、12.04 LTS,然后再升级到 12.10。

其次,这种升级方法太长太复杂,而且有很多事情可能会出错(实际上你已经到了那个阶段)。你需要下载大约 12GiB 的更新才能达到 12.10 版本。

第三,由于第一和第二点,备份重要资料会更简单,更安全,从主页下载 Ubuntu 13.04 或 12.04 LTS 的 ISO,刻录或创建 live usb 并安装 Ubuntu。这里有一份完整的指南这里如何做到这一点。

相关内容