0

I am working on a Ubuntu Ubuntu 12.04.2 LTS (GNU/Linux 3.5.0-43-generic x86_64) machine.

There are some packages that I need to install, and in order to be able to that, first I have to run apt-get -f install.

But this is what I get when I run apt-get -f install:

root@SERVERLINUX:/boot# 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:
  firefox-globalmenu python2.6-minimal linux-headers-3.5.0-39-generic linux-headers-3.5.0-34 linux-headers-3.5.0-37
  linux-headers-3.5.0-39 thunderbird-globalmenu linux-headers-3.5.0-34-generic linux-headers-3.5.0-37-generic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  linux-image-generic-lts-quantal
The following packages will be upgraded:
  linux-image-generic-lts-quantal
1 upgraded, 0 newly installed, 0 to remove and 440 not upgraded.
2 not fully installed or removed.
Need to get 0 B/2.442 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-image-generic-lts-quantal:
 linux-image-generic-lts-quantal depends on linux-image-3.5.0-44-generic; however:
  Package linux-image-3.5.0-44-generic is not installed.
dpkg: error processing linux-image-generic-lts-quantal (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-lts-quantal:
 linux-generic-lts-quantal depends on linux-image-generic-lts-quantal; however:
  Package linux-image-generic-lts-quantal 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.
                                                                                       dpkg: error processing linux-generic-lts-quantal (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-generic-lts-quantal
 linux-generic-lts-quantal
E: Sub-process /usr/bin/dpkg returned an error code (1)

What's going on? How can I manage to run apt-get -f install succesfully? How can I solve those dependency errors?

EDIT:

This is what I get when I run dpkg --configure -a, as suggested by Mohsen Pahlevanzadeh:

root@SERVERLINUX:/boot# dpkg --configure -a
dpkg: dependency problems prevent configuration of linux-image-generic-lts-quantal:
 linux-image-generic-lts-quantal depends on linux-image-3.5.0-44-generic; however:
  Package linux-image-3.5.0-44-generic is not installed.
dpkg: error processing linux-image-generic-lts-quantal (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-lts-quantal:
 linux-generic-lts-quantal depends on linux-image-generic-lts-quantal; however:
  Package linux-image-generic-lts-quantal is not configured yet.
dpkg: error processing linux-generic-lts-quantal (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-generic-lts-quantal
 linux-generic-lts-quantal
  • Can you add debugging info per my answer in unix.stackexchange.com/q/121180/4671 please. – Faheem Mitha Sep 8 '14 at 11:27
  • You could also paste the output of apt-get install linux-image-3.5.0-44-generic. – Faheem Mitha Sep 8 '14 at 11:29
  • @FaheemMitha that seems to have solved the OP's issue. Could you post it as an answer? – terdon Sep 8 '14 at 11:40
2

Running

apt-get install linux-image-3.5.0-44-generic.

solved the poster's problem.

  • First of all thank you Faheem. I would also like to know what has happened and why. Is there any information you could need? – Xar Sep 8 '14 at 12:16
  • Sure, post the debugging information I mentioned earlier. That may not tell us anything useful, though. Also, can you paste the original command you used to install the linux image package? In your question we only see your attempt to recover from the problem using apt-get -f install. – Faheem Mitha Sep 8 '14 at 12:21
1

After same error:

apt-get update ### for resynchronize with your server
apt-get -f install ### fixing your problem 
####And  if your problem stay still you have two way:
####at first run :
dpkg --configure -a ### becuase after apt-get update , error of apt-get -f install may be changed

### two: wait to server will be changed
0

For me the solution was different.

I used the command aptitude, when the graphical menu appeared I used / to get a pop-up search field and find all the linux-header, linux-image, linux-server versions and removed all but the one currently not used by pressing -.

To find the current kernel version I used uname -r.

Finally I installed a newer version of linux-{header, image, server} in the order specified by selecting them and pressing +.

To confirm the updates I used u.

At the end I rebooted and everything was fixed.

-2

Adding force-all to /etc/dpkg/dpkg.cfg should fix it:

# echo "force-all" > /etc/dpkg/dpkg.cfg 
# apt-get -f install
  • 1
    Welcome to U&L. We generally like the answers to explain details as to what they're doing and how they work. 1 line answers, or answers that give commands w/o any explanation are discouraged. – slm Nov 11 '14 at 17:25

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.