Ubuntu 12.04 LTS initramfs-tools依赖问题

我知道已经多次询问过,但每个问题和解决方案似乎都有所不同。 我已经尝试了几乎所有我能想到的东西,但我无法解决这个问题。

我有一个运行12.04.03 LTS的VM(我认为是VMware),它已经卡住了依赖关系。 VM位于租用的主机上,运行实时系统,所以我不想打破它(进一步)。

uname -a Linux support 3.5.0-36-generic #57~precise1-Ubuntu SMP Thu Jun 20 18:21:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux 

多一点:

 sudo apt-get update [sudo] password for tracker: Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies. initramfs-tools : Depends: initramfs-tools-bin (< 0.99ubuntu13.1.1~) but 0.99ubuntu13.3 is installed E: Unmet dependencies. Try using -f. sudo apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following extra packages will be installed: initramfs-tools The following packages will be upgraded: initramfs-tools 1 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. 2 not fully installed or removed. Need to get 0 B/50.3 kB of archives. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? Y dpkg: dependency problems prevent configuration of initramfs-tools: initramfs-tools depends on initramfs-tools-bin (<< 0.99ubuntu13.1.1~); however: Version of initramfs-tools-bin on system is 0.99ubuntu13.3. dpkg: error processing initramfs-tools (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates it's a follow-up error from a previous failure. dpkg: dependency problems prevent configuration of apparmor: apparmor depends on initramfs-tools; however: Package initramfs-tools is not configured yet. dpkg: error processing apparmor (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates it's a follow-up error from a previous failure. Errors were encountered while processing: initramfs-tools apparmor E: Sub-process /usr/bin/dpkg returned an error code (1) 

如果我查看initramfs-tools / bin背后的政策,我会得到:

 apt-cache policy initramfs-tools initramfs-tools: Installed: 0.99ubuntu13.1 Candidate: 0.99ubuntu13.3 Version table: 0.99ubuntu13.3 0 500 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages *** 0.99ubuntu13.1 0 100 /var/lib/dpkg/status 0.99ubuntu13 0 500 http://gb.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages apt-cache policy initramfs-tools-bin initramfs-tools-bin: Installed: 0.99ubuntu13.3 Candidate: 0.99ubuntu13.3 Version table: *** 0.99ubuntu13.3 0 500 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages 100 /var/lib/dpkg/status 0.99ubuntu13 0 500 http://gb.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages 

所以问题似乎是我对于initramfs-tools-bin还有0.99ubuntu13.1对于initramfs-tools还有0.99ubuntu13.1 ,并且无法升级到0.99ubuntu13.3

我已多次执行apt-get clean / autoclean / install -f / upgrade -f但它们无法解决。

我只能想到其他两个“解决方案”:

  1. 编辑dpkg依赖关系列表以欺骗它执行具有损坏的依赖关系的安装。 这似乎非常狡猾,这将是最后的手段
  2. 将initramfs-tools和initramfs-tools-bin从精确/主要来源降级到0.99ubuntu13并希望能够将它们分步进行。 但是我不确定这是否可能,或者是否会引入更多问题。

我不确定这种情况是如何产生的。 / boot满96%; 它现在已满56%(它很小 – 64MB ……这是我从托管公司获得的)。

有人可以提供建议吗?

打开以下文件;

 sudo gedit /var/lib/dpkg/status 

删除与initramfs相关的所有条目。

打开synaptic并删除与initramfs相关的所有包。

sudo apt-get update (或重新加载synaptic中的repos)

再试一次安装。