0

I have a 12.04 ubuntu system where I am unable to add any packages. We think what happened was that a partition became 100% full, and an upgrade got partially completed and now the package management is in a bad state.

Output of uname:

$ uname -a
Linux right 3.13.0-93-generic #140~precise1-Ubuntu SMP Tue Jul 19 19:55:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

When I add a package I get a dependency error:

$ sudo apt-get install netperf
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-headers-generic-lts-trusty : Depends: linux-headers-3.13.0-93-generic but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Installing the dependency fails:

$ sudo apt-get  install linux-headers-3.13.0-93-generic
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-headers-3.13.0-93-generic : Depends: linux-headers-3.13.0-93 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Trying to install the linux-headers-3.13.0-93 dependency also fails:

$ sudo apt-get install linux-headers-3.13.0-93
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-headers-generic-lts-trusty : Depends: linux-headers-3.13.0-93-generic but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Running "sudo apt-get -f install" hits the same issue:

$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  linux-headers-3.13.0-43 linux-tools-3.2.0-102 linux-headers-3.13.0-43-generic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  linux-headers-generic-lts-trusty
The following packages will be upgraded:
  linux-headers-generic-lts-trusty
1 upgraded, 0 newly installed, 0 to remove and 52 not upgraded.
2 not fully installed or removed.
Need to get 0 B/2,364 B 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 linux-headers-generic-lts-trusty:
 linux-headers-generic-lts-trusty depends on linux-headers-3.13.0-93-generic; however:
  Package linux-headers-3.13.0-93-generic is not installed.
dpkg: error processing linux-headers-generic-lts-trusty (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-lts-trusty:
 linux-generic-lts-trusty depends on linux-headers-generic-lts-trusty; however:
  Package linux-headers-generic-lts-trusty is not configured yet.
dpkg: error processing linux-generic-lts-trusty (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
 linux-headers-generic-lts-trusty
 linux-generic-lts-trusty
E: Sub-process /usr/bin/dpkg returned an error code (1)

The commands:

sudo apt-get clean
sudo apt-get autoclean

...have no effect on the issue.

Trying "dist-upgrade" also fails:

$ sudo apt-get -u 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-headers-generic-lts-trusty : Depends: linux-headers-3.13.0-93-generic but it is not installed
E: Unmet dependencies. Try using -f.

Anyone have ideas on how to get things working?

Thanks, Stuart

  • Have you edited your sources.list file or added any repos/ppa? – Owen Hines Oct 5 '16 at 14:26
  • Based on the timestamp, sources.list has not been touched. – b08248 Oct 5 '16 at 19:08
0

I was able to solve this by downloading the packages and then installing using dpkg.

sudo apt-get download linux-headers-3.13.0-93-generic  
sudo apt-get download linux-headers-3.13.0-93  

Then:

sudo dpkg -i linux-headers-3.13.0-93_3.13.0-93.140~precise1_all.deb  
sudo dpkg -i linux-headers-3.13.0-93-generic_3.13.0-93.140~precise1_amd64.deb  

After that, things worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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