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.

My Laptop had lost power a couple of times recently, and now, whenever I try to do a package operation I am getting the following error code. I tried searching for a solution on the forums, but these either required a package operation or were left unanswered. 'uname -r' tells me my kernel is 3.11.0-17-generic, but it seems like my kernel header says 3.11.0-18-generic. I tried booting old kernel versions to try to fix the issue, but I encountered the same error. Anyone know what I could do?

sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-3.11.0-18-generic (3.11.0-18.32) ...
Running depmod.
Failed to run depmod
dpkg: error processing linux-image-3.11.0-18-generic (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-extra-3.11.0-18-generic:
linux-image-extra-3.11.0-18-generic depends on linux-image-3.11.0-18-generic; however:
  Package linux-image-3.11.0-18-generic is not configured yet.

dpkg: error processing linux-image-extra-3.11.0-18-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-3.11.0-18-generic; however:
  Package linux-image-3.11.0-18-generic is not configured yet.
 linux-image-generic depends on linux-image-extra-3.11.0-18-generic; however:
  Package linux-image-extra-3.11.0-18-generic is not configured yet.

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.11.0.18.19); however:
  Package linux-image-generic is not configured yet.
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.
     No apport report written because MaxReports is reached already

dpkg: error processing linux-generic (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-3.11.0-18-generic
 linux-image-extra-3.11.0-18-generic
 linux-image-generic
 linux-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
share|improve this question
    
post the output of uname -r command. –  Avinash Raj Mar 17 at 18:40
    
as stated in the question, it is '3.11.0-17-generic' –  user209184 Mar 20 at 0:56

1 Answer 1

up vote 1 down vote accepted

Run these commands to remove unconfigured packages,

sudo dpkg -P linux-image-3.11.0-18-generic
sudo dpkg -P linux-image-extra-3.11.0-18-generic
sudo dpkg -P linux-image-generic
sudo dpkg -P linux-generic

Then finally run the below command to fix the package dependencies,

sudo apt-get install -f
share|improve this answer
    
As stated in the question, every time I try to do a package operation, I get this error code, and this method, requiring a package operation, fails for me. –  user209184 Mar 23 at 1:11
    
Post the output of first command on pastebin –  Avinash Raj Mar 23 at 1:36
    
Many apologies and thanks. I did not have access to my laptop at the time of my reply, and assumed, based on the fact that both 'dpkg --configure' and 'apt-get purge' yielded the same result, that this would end up the same. Stupid assumption for sure. Thanks –  user209184 Mar 25 at 2:16

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.