10

My battery died on an upgrade and now I have this problem when I try to install updates. How do I fix it?

The following packages have unmet dependencies:
linux-generic: Depends: linux-image-generic (= 3.2.0.52.62) but 3.2.0.57.68 is installed
Depends: linux-headers-generic (= 3.2.0.52.62) but 3.2.0.57.68 is installed
1
  • Hi It is not working. I am seeing things along the lines of: dpkg: dependency problems prevent configuration of linux generic: and dpkg: error processing linux-generic (--configure): dependency problems leaving unconfigured
    – user224338
    Dec 11, 2013 at 12:54

4 Answers 4

16

Fire this at command line:

 $ sudo apt-get install -f 

This checks your lib and if it finds unmet dependency, it'll fetch the needed files and install them.

Meanwhile - that dependency version of image-generic told me that you are running on 12.04. Perhaps this case will do the trick:

    $ sudo apt-get install syslinux-themes-debian-wheezy
    $ sudo apt-get upgrade && sudo apt-get dist-upgrade
    $ sudo dpkg-reconfigure -a
2
  • Hi It is not working. I am seeing things along the lines of: dpkg: dependency problems prevent configuration of linux generic: and dpkg: error processing linux-generic (--configure): dependency problems leaving unconfigured –
    – user224338
    Dec 11, 2013 at 13:13
  • see my edit to reflect options
    – Faron
    Dec 11, 2013 at 15:32
12

I just ran into this unmet dependencies problem while trying to do an "apt-get upgrade", but also had the additional issue of /boot having run out of space.

Some errors which provide clues that your /boot is out of space:

gzip: stdout: No space left on device

No apport report written because the error message indicates a disk full error

This meant that apt-get was helpless, with "sudo apt-get install -f" and "sudo apt-get autoremove" failing to work.

In the end, the link in Justin's answer provided the solution:

1) Check how many old linux-generic kernels you've got installed:

find /boot -type f -regex "^.*-generic"

2) If more than 2, manually clean out the old ones

sudo find /boot -type f -regex "^.*XX-generic" -delete

Replacing XX with the number of the old kernel you wish to remove (e.g. find /boot -type f -regex "^.*24-generic" -delete) Make sure you leave the latest two kernels (highest two numbers).

3) Now you've got space to fix the unmet dependencies:

sudo apt-get -f install
0
5

Removing and reinstalling linux-generic will solve this issue.To do this,try the below command on virtual console(ctrl+alt+F1)

sudo apt-get purge linux-generic    
sudo apt-get install --reinstall linux-generic
2
  • 3
    Isn't it a tad bit dangerous to purge linux-generic?! Wouldn't that remove the kernel? So if you reboot in the middle of it... bye bye everything? Apr 2, 2017 at 6:25
  • 1
    @AlexisWilke I think this answers your question Jun 28, 2023 at 8:00
4

I know this is a fairly old thread, but found a solution on another forum. The person suggested deleting all of the old kernel files as I ran into the same problem. It was because my /boot partition was full and therefore apt couldn't unpack and install anything. Here it is: How to handle out of space errors

Cheers, Justin

1
  • Hah! I know of that one, but rarely think about looking are my df /boot... I had to run apt-get autoremove --purge once to get things back in order (i.e. the following dist-upgrade still generated an error, but after that, all good!) Apr 2, 2017 at 7:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .