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 05 '17 at 07:32
  • I updated the answer with dkms-info – Rien Heuver Sep 05 '17 at 09:35
  • @Zanna Please help. I have the same problem and my dhms status is nvidia, 390.138, 4.15.0-76-generic, x86_64: installed nvidia, 390.138, 5.4.0-48-generic, x86_64: installed nvidia, 390.138, 5.4.0-51-generic, x86_64: installed nvidia, 390.138, 5.4.0-52-generic, x86_64: installed. Any help would be much appreciated. – nkhl Nov 13 '20 at 03:53
  • @NikhilShrivastava sorry my friend, I don't have the knowledge to solve that. No experience with nvidia myself. Please do consider asking a new question with all your system details and hopefully someone else will be able to help you out. All the best. – Zanna Nov 13 '20 at 07:16

1 Answers1

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
Pilot6
  • 90,100
  • 91
  • 213
  • 324
  • Hi, I have the same problem and I've been struggling for so long to resolve it, could you please help. My dkms status is nvidia, 390.138, 4.15.0-76-generic, x86_64: installed nvidia, 390.138, 5.4.0-48-generic, x86_64: installed nvidia, 390.138, 5.4.0-51-generic, x86_64: installed nvidia, 390.138, 5.4.0-52-generic, x86_64: installed. – nkhl Nov 13 '20 at 03:55