7

Today I went over to my grandma because she had some problems with her computer, running Xubuntu 12.04LTS. After fixing 'the problem' (Firefox was set fullscreen..) I ran the usual apt-get update && apt-get dist-upgrade to immediately update everything. Instead I was greeted by an error that some packages where not correctly installed. So I ran dpkg --configure -a. My guess is that, because Firefox was fullscreen, she couldn't figure out how to turn of her computer and had simply turned it of, probably at the exact moment when it was installing automatic security updates. Running dpkg --configure -a however only left me with an error message about unmet dependencies for linux-generic. When running apt-get dist-upgrade again, it told me the same and I should try the -f option. However, even while trying to force the upgrade it still wont install them.

This is the output from the commands (added LANG=C because default language is Dutch).

jeroen@Bomma:/home/bomma$ LANG=C sudo apt-get dist-upgrade
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:
 linux-generic : Depends: linux-image-generic (= 3.2.0.37.45) but 3.2.0.38.46 is installed
                 Depends: linux-headers-generic (= 3.2.0.37.45) but 3.2.0.38.46 is installed
E: Unmet dependencies. Try using -f.

Running it with -f:

jeroen@Bomma:/home/bomma$ LANG=C sudo apt-get -f dist-upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
Calculating upgrade... Done
The following packages will be upgraded:
  linux-generic
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1.722 B of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]?  
dpkg: dependency problems prevent configuration of linux-generic:
 linux-generic depends on linux-image-generic (= 3.2.0.37.45); however:
  Version of linux-image-generic on system is 3.2.0.38.46.
 linux-generic depends on linux-headers-generic (= 3.2.0.37.45); however:
  Version of linux-headers-generic on system is 3.2.0.38.46.
dpkg: error processing linux-generic (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
    Errors were encountered while processing:
 linux-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

I'm out of ideas on how to solve this (other than quickly reinstalling her pretty default xubuntu)? Trying to remove and reinstall the linux-generic package seems rather risky, but maybe that would solve it?

1
  • Jeroen@Bomma :-D
    – Natrium
    Feb 26, 2013 at 6:40

1 Answer 1

12

Removing linux-generic will do no harm at all. It is only a "meta-package" depending on linux-image-generic and linux-headers-generic. Those two are themselves meta-packages depending on the respective latest image/headers packages.

You can see this for yourself by issuing apt-cache show linux-generic, apt-cache show linux-image-generic and apt-cache show linux-headers-generic.

The purpose of meta-packages is to pull-in the packages on which they depend, they have no functionality at all. On the other hand removing one will not remove it's dependencies - so no danger to the system.

After having fixed the original issue you can of course install linux-generic again.

3
  • 1
    Removing the package did solve the issue. After that I reinstalled linux-generic (just to be sure) and that worked as well. I also saw that apt showed it extracted linux-generic from the package for the 3.2.0.38.46 kernel. So I guess during the previous upgrade, linux-generic from 3.2.0.37.45 was installed, apt upgraded the kernel to 3.2.0.38.46 and then, before linux-generic itself was updated, the computer was turned of, leaving everything in a conflicting state. Thanks for your help!
    – jeroen
    Feb 26, 2013 at 19:31
  • Thx for reporting back, I included your hint about reinstalling linux-generic in my answer.
    – guntbert
    Feb 26, 2013 at 19:41
  • Had a similar issue with linux-generic-hwe-18.04 and linux-image-generic-hwe-18.04 having unmet dependencies and refusing to be fixed with apt --fix-broken install. Running sudo apt remove linux-generic-hwe-18.04 linux-image-generic-hwe-18.04 fixed the issue, and I was at last able to upgrade my system.
    – borizzzzz
    Sep 19, 2019 at 9:30

You must log in to answer this question.

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