4

After falling into a root disk full issue due to the automatic updates installing new kernel with removing of old ones, I am now facing a dependency issue that prevent any upgrade of my system.

the sudo apt-get -f install command ends with the following error:

dpkg: dependency problems prevent configuration of linux-image-virtual:
 linux-image-virtual depends on linux-image-3.2.0-52-virtual; however:
  Package linux-image-3.2.0-52-virtual is not installed.
dpkg: error processing linux-image-virtual (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from    a previous failure.                                                                                                                    

dpkg: dependency problems prevent configuration of linux-virtual:
 linux-virtual depends on linux-image-virtual (= 3.2.0.52.62); however:
  Package linux-image-virtual is not configured yet.
 linux-virtual depends on linux-headers-virtual (= 3.2.0.52.62); however:
  Version of linux-headers-virtual on system is 3.2.0.53.63.
dpkg: error processing linux-virtual (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from   a previous failure.


Errors were encountered while processing:
 linux-image-virtual
 linux-virtual
E: Sub-process /usr/bin/dpkg returned an error code (1)

I have read several time another questions that seems to be very similar to my case but I was unable to solve my problem.

If I understand correctly the output below it seems that in my case the linux-headers-virtual package has an higher version that the linux-image-virtual

Extract of the output of the dpkg -l command :

ii  linux-headers-3.2.0-52           3.2.0-52.78                       Header files   related to Linux kernel version 3.2.0
ii  linux-headers-3.2.0-52-generic   3.2.0-52.78                       Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
ii  linux-headers-3.2.0-52-virtual   3.2.0-52.78                       Linux kernel headers for version 3.2.0 on 64 bit x86 Virtual Guests
ii  linux-headers-3.2.0-53           3.2.0-53.81                       Header files related to Linux kernel version 3.2.0
ii  linux-headers-3.2.0-53-virtual   3.2.0-53.81                       Linux kernel headers for version 3.2.0 on 64 bit x86 Virtual Guests
ii  linux-headers-generic            3.2.0.52.62                       Generic Linux kernel headers
ii  linux-headers-virtual            3.2.0.53.63                       Linux kernel headers for virtual machines
ii  linux-image-3.2.0-44-generic     3.2.0-44.69                       Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii  linux-image-3.2.0-44-virtual     3.2.0-44.69                       Linux kernel image for version 3.2.0 on 64 bit x86 Virtual Guests
ii  linux-image-3.2.0-45-generic     3.2.0-45.70                       Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii  linux-image-3.2.0-45-virtual     3.2.0-45.70                       Linux kernel image for version 3.2.0 on 64 bit x86 Virtual Guests
ii  linux-image-3.2.0-48-generic     3.2.0-48.74                       Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii  linux-image-3.2.0-48-virtual     3.2.0-48.74                       Linux kernel image for version 3.2.0 on 64 bit x86 Virtual Guests
ii  linux-image-3.2.0-51-generic     3.2.0-51.77                       Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii  linux-image-3.2.0-51-virtual     3.2.0-51.77                       Linux kernel image for version 3.2.0 on 64 bit x86 Virtual Guests
ii  linux-image-3.2.0-52-generic     3.2.0-52.78                       Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii  linux-image-3.2.0-53-virtual     3.2.0-53.81                       Linux kernel image for version 3.2.0 on 64 bit x86 Virtual Guests
ii  linux-image-generic              3.2.0.52.62                       Generic Linux kernel image
iU  linux-image-virtual              3.2.0.52.62                       Linux kernel image for virtual machines
iU  linux-virtual                    3.2.0.52.62                       Complete Linux kernel for virtual machines 

Output of df -h (after resizing the root partition):

Filesystem                         Size  Used Avail Use% Mounted on
/dev/xvda2                          22G  961M   20G   5% /
udev                               111M  8.0K  111M   1% /dev
tmpfs                               48M  212K   48M   1% /run
none                               5.0M     0  5.0M   0% /run/lock
none                               120M     0  120M   0% /run/shm
/dev/xvda1                         461M  194M  244M  45% /boot
/dev/mapper/Main-Main--var         4.6G  339M  4.1G   8% /var
/dev/mapper/Main-Main--usr         4.6G  1.1G  3.3G  25% /usr
/dev/mapper/Main-Main--home        1.4G   35M  1.3G   3% /home
/dev/mapper/Main-Main--tmp         1.4G   35M  1.3G   3% /tmp
/dev/mapper/Main-Main--var----lib  2.8G  303M  2.4G  12% /var/lib

Output of df -i

Filesystem                         Inodes  IUsed   IFree IUse% Mounted on
/dev/xvda2                        1320336  28766 1291570    3% /
udev                                28362    433   27929    2% /dev
tmpfs                               30546    336   30210    2% /run
none                                30546      4   30542    1% /run/lock
none                                30546      1   30545    1% /run/shm
/dev/xvda1                         121920    276  121644    1% /boot
/dev/mapper/Main-Main--var         305216    460  304756    1% /var
/dev/mapper/Main-Main--usr         305216 197641  107575   65% /usr
/dev/mapper/Main-Main--home         91392     21   91371    1% /home
/dev/mapper/Main-Main--tmp          91776     11   91765    1% /tmp
/dev/mapper/Main-Main--var----lib  183264   4540  178724    3% /var/lib

uname -r output:

3.2.0-44-virtual

dpkg --print-architecture output

amd64

Any help will highly appreciated. Thanks in advance.

user194043
  • 121
  • 1
  • 4

1 Answers1

8

Having no answer so far, I did to new tries ... Seeing that the dependencies issues was linux to linux-virtual and linux-headers-virtual I try to remove the package (as I understood that those package are virtual packages). so I performed

sudo apt-get remove linux-headers-virtual linux-virtual  

the command was successful so I tried to reinstall it using

sudo apt-get install linux-headers-virtual linux-virtual

which was also successful. To validate I tried

sudo apt-get -f install  

which was successful !!! finally to clean up I did

sudo apt-get autoremove

After a reboot everything work well and I was able to perform a apt-get dist-upgrade.

Hope that this can help some folks !!!

user194043
  • 121
  • 1
  • 4
  • Not only helped me, it was an enormous relief after hours spent chasing down a long rat-hole of debugging an important prod server. Thanks! – algal Feb 06 '16 at 07:57
  • in my case also had to run a linux-image-3.13.0-144-generic and get the system to reboot – Altanai Apr 08 '18 at 03:58