2

I am trying to update Ubuntu 16.04.3, but the system can't seem to finish the task. It stops at configuring linux-headers-4.14.0-31-generic.

When I run sudo dpkg --configure -a the result is:

Setting up linux-headers-4.13.0-31-generic (4.13.0-31.34~16.04.1) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.13.0-31-generic /boot/vmlinuz-4.13.0-31-generic

and it seems to hang there.

Update:

also when use (Ctrl+C) to stop updating it show:

dpkg: error processing package linux-signed-generic-hwe-16.04 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-headers-4.13.0-31-generic
 linux-image-4.13.0-31-generic
 linux-image-generic-hwe-16.04
 linux-image-extra-4.13.0-31-generic
 linux-signed-image-4.13.0-31-generic
 linux-headers-generic-hwe-16.04
 linux-signed-image-generic-hwe-16.04
 linux-generic-hwe-16.04
 linux-signed-generic-hwe-16.04
7
  • What do you mean "stop"? Does it hang? Does it abort ? Can you please post more of the output and use the markup for code (it makes it more readable) Jan 23, 2018 at 9:31
  • i mean that nothing happens. yes it hang. and there is no more output
    – Mo E
    Jan 23, 2018 at 9:35
  • thanks! so the dkmspart can take a while - minutes, maybe longer. How long have you left it running before you tried aborting ? Other thing to check, just to cover your bases, would be: is there enough diskspace (via df -h)? Jan 23, 2018 at 9:57
  • i left it for 30 min or more. and i checked the diskspace and i have free space
    – Mo E
    Jan 23, 2018 at 10:06
  • same here, left it all night and found it still stuck at that line!
    – mewais
    Jan 23, 2018 at 13:47

1 Answer 1

3

So I had exactly the same issue and I still don't know what the issue is but I do know what caused it. Apparently this only happens when running on the nvidia card when doing the update, the simple fix therefore is to switch to the intel card. In my case my desktop wasn't working on intel so I did the following:

Switch to a different tty (CTRL+ALT+F6 for example) then I shut down my window manager:

sudo service lightdm stop

Next I made sure to switch to the intel card:

sudo nvidia-select intel

Then in order to clean up the mess of leaving apt and dpkg in a state I ran:

sudo killall apt && sudo killall dpkg

Following that I needed to run:

sudo dpkg --configure -a

When this froze I skipped the freezing step with CTRL+C which is fine but this brought me in an okay state again, running sudo apt update && sudo apt upgrade -y allowed me to update all my packages again! If you use a laptop with an intel and nvidia card on Ubuntu and something is not working always blame the nvidia drivers first.

1
  • 1
    For me just the last 2 steps were enough. sudo killall apt && sudo killall dpkg and sudo dpkg --configure -a. On ubuntu 18.04.2
    – Coo
    Apr 5, 2019 at 1:31

You must log in to answer this question.

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