Ubuntu 12.04 LTS initramfs-tools 依赖问题

Ubuntu 12.04 LTS initramfs-tools 依赖问题

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

我有一台运行 12.04.03 LTS 的虚拟机(我认为是 VMware),它有卡住的依赖关系。该虚拟机位于租用的主机上,运行实时系统,因此我不想(进一步)破坏它。

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

因此问题似乎是我尚未拥有,0.99ubuntu13.3并且initramfs-tools-bin无法升级到。0.99ubuntu13.1initramfs-tools0.99ubuntu13.3

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

我能想到的只有另外两个“解决方案”:

  1. 编辑 dpkg 依赖列表,诱使它在依赖关系损坏的情况下进行安装。这看起来非常不靠谱,而且这将是最后的手段
  2. 将 initramfs-tools 和 initramfs-tools-bin 从精确/主要来源降级到 0.99ubuntu13,并希望这能让它们步调一致。但是我不确定这是否可行,或者是否会带来更多问题。

我不知道这种情况是怎么发生的。/boot 以前占用了 96%;现在只占用了 56%(它很小 - 64MB...这是我从托管公司得到的)。

有人可以提供建议吗?

答案1

打开以下文件;

sudo gedit /var/lib/dpkg/status

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

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

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

尝试再次安装。

相关内容