Ubuntu 12.04 LTS initramfs-tools dependency issue
- by Mike
I know this has been asked several times, but each issue and resolution seems different. I've tried almost everything I could think of, but I can't fix this.
I have a VM (VMware I think) running 12.04.03 LTS which has stuck dependencies. The VM is on a rented host, running a live system so I don't want to break it (further).
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
Some more:
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)
If I look at the policy behind initramfs-tools / bin I get:
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
So the issue seems to be I have 0.99ubuntu13.3 for initramfs-tools-bin yet 0.99ubuntu13.1 for initramfs-tools, and can't upgrade to 0.99ubuntu13.3.
I've performed apt-get clean/autoclean/install -f/upgrade -f many times but they won't resolve.
I can think of only 2 other 'solutions':
Edit the dpkg dependency list to trick it into doing the installation with a broken dependency. This seems very dodgy and it would be a last resort
Downgrade both initramfs-tools and initramfs-tools-bin to 0.99ubuntu13 from the precise/main sources and hope that would get them in step. However I'm not sure if this will be possible, or whether it would introduce more issues.
I'm not sure how this situation arise in the first place. /boot was 96% full; it's now 56% full (it's tiny - 64MB ... this is what I got from the hosting company).
Can anyone offer advice please?