1

I upgraded tot 17.04 (from Ubuntu Gnome 16.10) recently and now get the following errors every time I try apt install or apt upgrade. I have tried removing the packages that appear to raise the errors, but nothing worked so far.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
  linux-image-extra-4.8.0-58-generic linux-image-extra-4.8.0-59-generic
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
11 not fully installed or removed.
After this operation, 322 MB disk space will be freed.
Do you want to continue? [Y/n] 
(Reading database ... 254844 files and directories currently installed.)
Removing linux-image-extra-4.8.0-58-generic (4.8.0-58.63) ...
depmod: FATAL: could not load /boot/System.map-4.8.0-58-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.8.0-58-generic /boot/vmlinuz-4.8.0-58-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.8.0-58-generic /boot/vmlinuz-4.8.0-58-generic
Error! Could not locate dkms.conf file.
File:  does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-extra-4.8.0-58-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-4.8.0-59-generic (4.8.0-59.64) ...
depmod: FATAL: could not load /boot/System.map-4.8.0-59-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.8.0-59-generic /boot/vmlinuz-4.8.0-59-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.8.0-59-generic /boot/vmlinuz-4.8.0-59-generic
Error! Could not locate dkms.conf file.
File:  does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-extra-4.8.0-59-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-extra-4.8.0-58-generic
 linux-image-extra-4.8.0-59-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

It appears some other 17.04 packages weren't entirely installed because of this which seems to raise some other problems (such as reboots when getting out of suspend). How do I get rid of these errors/how do I get 17.04 fully working?

Edit 1:

rienheuver@rien-emperor:~$ dkms status
i915_bpo, usbc: added
i915, usbc, 4.8.0-41-generic, x86_64: installed

I have a Dell XPS 13 9350, so usbc seems relevant. But I'm not sure I use any of these and/or if they are still relevant/needed.

  • Do you know what you're using dkms for? That seems to be causing the problem. – Zanna Sep 5 '17 at 7:32
  • I updated the answer with dkms-info – Rien Heuver Sep 5 '17 at 9:35
2

You have some crappy DKMS packages. I suggest to remove them:

sudo dkms remove i915/usbc --all
sudo dkms remove i915_bpo/usbc --all

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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