[Seek Help] DKMS Error
Tofloor
poster avatar
granwille
deepin
2021-04-21 23:33
Author

Good day

Earlier today, I had a VirtualBox update, which I proceeded to install:

granwille@granwille-PC:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  cups-bsd keditbookmarks kinit libexiv2-14 libkf5bookmarks-data libkf5bookmarks5 libkf5js5 libkf5jsapi5
  libkf5kexiv2-15.0.0 libkf5kiogui5 libkf5parts-data libkf5parts-plugins libkf5parts5 libkf5pty-data libkf5pty5
  libkf5threadweaver5 libokular5core8 libpoppler-qt5-1 libqca-qt5-2 libqca-qt5-2-plugins libqmobipocket2
  libspectre1 linux-compiler-gcc-8-x86 linux-headers-5.3.0-3-amd64 linux-headers-5.3.0-3-common linux-headers-amd64
  linux-image-unsigned-5.3.0-42-generic linux-kbuild-5.3 linux-modules-5.3.0-42-generic org.kde.okular
The following packages will be upgraded:
  virtualbox-6.1
1 upgraded, 30 newly installed, 0 to remove and 0 not upgraded.
Need to get 133 MB of archives.
After this operation, 167 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

However, after doing so, I got an error related to DKMS:


granwille@granwille-PC:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  linux-headers-5.10.5-amd64-desktop+
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-unsigned-5.3.0-42-generic (5.3.0-42.34) ...
Setting up linux-headers-5.3.0-3-amd64 (5.3.15-6apricot) ...
/etc/kernel/header_postinst.d/dkms:
Error! Could not locate dkms.conf file.
File: /var/lib/dkms/bbswitch/0.8/source/dkms.conf does not exist.
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 4
Failed to process /etc/kernel/header_postinst.d at /var/lib/dpkg/info/linux-headers-5.3.0-3-amd64.postinst line 11.
dpkg: error processing package linux-headers-5.3.0-3-amd64 (--configure):
 installed linux-headers-5.3.0-3-amd64 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of linux-headers-amd64:
 linux-headers-amd64 depends on linux-headers-5.3.0-3-amd64 (= 5.3.15-6apricot); however:
  Package linux-headers-5.3.0-3-amd64 is not configured yet.

dpkg: error processing package linux-headers-amd64 (--configure):
 dependency problems - leaving unconfigured
Processing triggers for linux-image-unsigned-5.3.0-42-generic (5.3.0-42.34) ...
/etc/kernel/postinst.d/dkms:
Error! Could not locate dkms.conf file.
File: /var/lib/dkms/bbswitch/0.8/source/dkms.conf does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-unsigned-5.3.0-42-generic (--configure):
 installed linux-image-unsigned-5.3.0-42-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-headers-5.3.0-3-amd64
 linux-headers-amd64
 linux-image-unsigned-5.3.0-42-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

I then ran this:


granwille@granwille-PC:~$ sudo apt autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-headers-5.10.5-amd64-desktop+
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 51.7 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 275203 files and directories currently installed.)
Removing linux-headers-5.10.5-amd64-desktop+ (5.10.5-amd64-desktop+-1) ...
dpkg: warning: while removing linux-headers-5.10.5-amd64-desktop+, directory '/lib/modules/5.10.5-amd64-desktop+' not empty so not removed
Setting up linux-image-unsigned-5.3.0-42-generic (5.3.0-42.34) ...
Setting up linux-headers-5.3.0-3-amd64 (5.3.15-6apricot) ...
/etc/kernel/header_postinst.d/dkms:
Error! Could not locate dkms.conf file.
File: /var/lib/dkms/bbswitch/0.8/source/dkms.conf does not exist.
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 4
Failed to process /etc/kernel/header_postinst.d at /var/lib/dpkg/info/linux-headers-5.3.0-3-amd64.postinst line 11.
dpkg: error processing package linux-headers-5.3.0-3-amd64 (--configure):
 installed linux-headers-5.3.0-3-amd64 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of linux-headers-amd64:
 linux-headers-amd64 depends on linux-headers-5.3.0-3-amd64 (= 5.3.15-6apricot); however:
  Package linux-headers-5.3.0-3-amd64 is not configured yet.

dpkg: error processing package linux-headers-amd64 (--configure):
 dependency problems - leaving unconfigured
Processing triggers for linux-image-unsigned-5.3.0-42-generic (5.3.0-42.34) ...
/etc/kernel/postinst.d/dkms:
Error! Could not locate dkms.conf file.
File: /var/lib/dkms/bbswitch/0.8/source/dkms.conf does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-unsigned-5.3.0-42-generic (--configure):
 installed linux-image-unsigned-5.3.0-42-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-headers-5.3.0-3-amd64
 linux-headers-amd64
 linux-image-unsigned-5.3.0-42-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)


With no luck, I played around a little and decided to remove the `/var/lib/dkms/bbswitch/0.8` directory and now when I run `--fix-broken install` I now get this error:

granwille@granwille-PC:/var/lib/dkms/bbswitch$ sudo apt install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up ndiswrapper-dkms (1.60-8) ...
Removing old ndiswrapper-1.60 DKMS files...

------------------------------
Deleting module version: 1.60
completely from the DKMS tree.
------------------------------
Done.
Loading new ndiswrapper-1.60 DKMS files...
Building for 5.7.7-amd64-desktop
Building initial module for 5.7.7-amd64-desktop
Error! Bad return status for module build on kernel: 5.7.7-amd64-desktop (x86_64)
Consult /var/lib/dkms/ndiswrapper/1.60/build/make.log for more information.
dpkg: error processing package ndiswrapper-dkms (--configure):
 installed ndiswrapper-dkms package post-installation script subprocess returned error exit status 10
Setting up anbox-modules-dkms (13-1) ...
Removing old anbox-1 DKMS files...

------------------------------
Deleting module version: 1
completely from the DKMS tree.
------------------------------
Done.
Loading new anbox-1 DKMS files...
Building for 5.7.7-amd64-desktop
Building initial module for 5.7.7-amd64-desktop
Error! Bad return status for module build on kernel: 5.7.7-amd64-desktop (x86_64)
Consult /var/lib/dkms/anbox/1/build/make.log for more information.
dpkg: error processing package anbox-modules-dkms (--configure):
 installed anbox-modules-dkms package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
 ndiswrapper-dkms
 anbox-modules-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)

Can someone please help me, I do not understand what DKMS is and why this issue is happening. What can I do to solve the problem? Any help will be appreciated, please?

Reply Favorite View the author
All Replies
BG7ZAG
deepin
2021-04-22 00:04
#1

应该是内核版本问题

我的VirtualBox版本 vm 6.1.18 r142142 (Qt5.15.1) ;

Linux内核版本:5.11.1

Reply View the author
granwille
deepin
2021-04-22 00:30
#2
BG7ZAG

应该是内核版本问题

我的VirtualBox版本 vm 6.1.18 r142142 (Qt5.15.1) ;

Linux内核版本:5.11.1

I am on kernel 5.7, Deepin 20.2. However, VirtualBox has a new version out. Do you recommend I upgrade my Kernel? Or what can I do?

Reply View the author
BG7ZAG
deepin
2021-04-22 00:50
#3
granwille

I am on kernel 5.7, Deepin 20.2. However, VirtualBox has a new version out. Do you recommend I upgrade my Kernel? Or what can I do?

There should be no need to upgrade the kernel. Maybe you can uninstall VirtualBox and then re install virtualbox-6.1

Reply View the author
BG7ZAG
deepin
2021-04-22 00:52
#4

You can try it

sudo apt update
sudo apt remove virtualbox-*
sudo apt install virtualbox-6.1

 

Reply View the author
BG7ZAG
deepin
2021-04-22 00:56
#5

Generally, the lower version of VirtualBox is not compatible with the higher kernel

 

Reply View the author
152******14
deepin
2021-04-22 02:26
#6

1. 安装Virtualbox官网最新版本

 

2. sudo deepin-editor /usr/share/virtualbox/src/vboxhost/vboxnetflt/linux/VBoxNetFlt-linux.c

 

3. 在第40行下面添加一行,内容为#include小于号linux/ethtool.h大于号

 

4. sudo /sbin/vboxconfig

我的6.1   内核5.11.15

Reply View the author
Ziggy
deepin
2021-04-22 04:25
#7

sudo dpkg --configure -a && sudo apt -f install

Reply View the author