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.

Long story short, my Ubuntu 12.04 VM ran out of space and an update failed. I then increased the disk space but am no longer able to update anything using apt-get.

This is the output of apt-get 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 : Depends: linux-headers-3.2.0-53-generic but it is not installed
 linux-image-generic : Depends: linux-image-3.2.0-53-generic but it is not installed
E: Unmet dependencies. Try using -f.

After that I run apt-get install -f and get this output:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  linux-generic linux-headers-generic linux-image-generic
The following packages will be upgraded:
  linux-generic linux-headers-generic linux-image-generic
3 upgraded, 0 newly installed, 0 to remove and 57 not upgraded.
3 not fully installed or removed.
Need to get 6448 B of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 [link removed] precise-updates/main linux-generic amd64 3.2.0.59.70 [1718 B]
Get:2 [link removed] precise-updates/main linux-image-generic amd64 3.2.0.59.70 [2370 B]
Get:3 [link removed] precise-updates/main linux-headers-generic amd64 3.2.0.59.70 [2360 B]
Fetched 6448 B in 0s (40.1 kB/s)           
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US:en",
    LC_ALL = (unset),
    LC_TIME = "fi_FI.UTF-8",
    LC_MONETARY = "fi_FI.UTF-8",
    LC_ADDRESS = "fi_FI.UTF-8",
    LC_TELEPHONE = "fi_FI.UTF-8",
    LC_NAME = "fi_FI.UTF-8",
    LC_MEASUREMENT = "fi_FI.UTF-8",
    LC_IDENTIFICATION = "fi_FI.UTF-8",
    LC_NUMERIC = "fi_FI.UTF-8",
    LC_PAPER = "fi_FI.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_ALL to default locale: No such file or directory
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-3.2.0-53-generic; however:
  Package linux-image-3.2.0-53-generic is not installed.
dpkg: error processing linux-image-generic (--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-headers-generic:
 linux-headers-generic depends on linux-headers-3.2.0-53-generic; however:
  Package linux-headers-3.2.0-53-generic is not installed.
dpkg: error processing linux-headers-generic (--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-generic:
 linux-generic depends on linux-image-generic (= 3.2.0.53.63); however:
  Package linux-image-generic is not configured yet.
 linux-generic depends on linux-headers-generic (= 3.2.0.53.63); however:
  Package linux-headers-generic is not configured yet.
dpkg: error processing linux-generic (--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-generic
 linux-headers-generic
 linux-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Then I tried dpkg --configure -a:

dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-3.2.0-53-generic; however:
  Package linux-image-3.2.0-53-generic is not installed.
dpkg: error processing linux-image-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
 linux-generic depends on linux-image-generic (= 3.2.0.53.63); however:
  Package linux-image-generic is not configured yet.
dpkg: error processing linux-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-headers-generic:
 linux-headers-generic depends on linux-headers-3.2.0-53-generic; however:
  Package linux-headers-3.2.0-53-generic is not installed.
dpkg: error processing linux-headers-generic (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-generic
 linux-generic
 linux-headers-generic

I'm not that proficient with Linux so I have no idea what to do next. Any help is appreciated. uname -r says 3.2.0-58-generic.

share|improve this question
    
post the output of sudo dpkg -P linux-generic –  Avinash Raj Mar 5 at 9:21
    
Follow this for locale issue. –  Avinash Raj Mar 5 at 9:24
    
This is the output: (Reading database ... 231286 files and directories currently installed.) Removing linux-generic ... But still apt-get update and -f install fail. –  user254948 Mar 5 at 9:25
    
please post the full output in pastebin.com and provide the link here. –  Avinash Raj Mar 5 at 9:27
    
Here are the outputs for apt-get upgrade and install -f after I ran dpkg -P: upgrade -f install –  user254948 Mar 5 at 10:12

1 Answer 1

up vote 0 down vote accepted

Remove all the three linux-image-generic, linux-generic, linux-headers-generic packages and then run an upgrade.

sudo dpkg -P linux-generic
sudo dpkg -P linux-image-generic
sudo dpkg -P linux-headers-generic
sudo apt-get upgrade
share|improve this answer
    
That did the trick! Thank you very much! –  user254948 Mar 5 at 10:33
    
Then, accept my answer. –  Avinash Raj Mar 5 at 10:33

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.