Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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':

  1. 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
  2. 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?

share|improve this question
    
Use Synaptic Package Manager to force install lower version of initramfs-tools this would be your only solution. –  Saurav Kumar Oct 29 '13 at 9:53
add comment

1 Answer 1

up vote 4 down vote accepted

Open the following file;

sudo gedit /var/lib/dpkg/status

Remove all entries related to initramfs.

Open synaptic and remove all packages relating to initramfs.

sudo apt-get update(or reload the repos in synaptic)

Try installing once more.

share|improve this answer
    
Hi - thanks for your suggestion. I'm a little nervous about editing /var/lib/dpkg/status. When you say 'remove all packages' do you mean those sections that relate to those 2 packages (about 20 lines each) and not other packages that refer to initramfs as a dependency? –  Mike Oct 29 '13 at 18:12
    
Mike, don't forget to backup your "status" file prior to editing it. When you edit the "status" file, only remove entries related to those 2 packages and not packages that refer them as dependencies. –  linuxandunix Oct 30 '13 at 5:05
    
Thanks! I'd already backed up everything in that folder but was apprehensive of editing 'status'. Did as you suggested and initramfs re-installed (on apt-get -f install) to 13.3 and apt-get is working again. Many thanks. –  Mike Oct 30 '13 at 19:09
    
You sir, saved my day... I had run a large safe-upgrade without noticing my / partition having about 200mb free space. Everything got f....d up. Editing the status file made the procedure move forward. –  Stefanos Kalantzis Dec 22 '13 at 12:00
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.