8

I am getting this error while installing Virtualbox on Ubuntu 20.04 LTS.

Loading new virtualbox-6.1.10 DKMS files...
Building for 5.8.0-34-generic
Building initial module for 5.8.0-34-generic
ERROR (dkms apport): kernel package linux-headers-5.8.0-34-generic is not supported
Error! Bad return status for module build on kernel: 5.8.0-34-generic (x86_64)
Consult /var/lib/dkms/virtualbox/6.1.10/build/make.log for more information.
dpkg: error processing package virtualbox-dkms (--configure):
 installed virtualbox-dkms package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
 virtualbox-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
0
4

You seem to have the -proposed repository enabled. Bad Idea.

$ rmadison linux-image-generic | grep groovy
[...]
 linux-image-generic | 5.8.0.33.38          | groovy-security  | amd64, arm64, armhf, ppc64el, s390x
 linux-image-generic | 5.8.0.33.38          | groovy-updates   | amd64, arm64, armhf, ppc64el, s390x
 linux-image-generic | 5.8.0.34.39          | groovy-proposed  | amd64, arm64, armhf, ppc64el, s390x

Your question states that you are using kernel version 5.8.0.34. You can see that version is ONLY available (as of today) in the groovy-proposed repository.

  • The -proposed pocket of the Ubuntu repositories is for testing packages before release into -updates. In a few days or weeks, the package will migrate to -updates...or might be withdrawn if it fails testing.

  • Advice: As a new user, DON'T use -proposed. It's likely to cause breakage exactly like you encountered.


How to fix the problem:

First, stop using the -proposed source.

Second, wait a few days or weeks for the -proposed packages already on your system to be properly integrated with your system (that's one reason they are in -proposed!). Then dkms will automagically work, and the install will work properly.

Alternately, folks who have proper skills can downgrade their packages. That's not a trivial operation for a beginner, and it risks various forms of breakage, so I'm not going to explain that in detail.

4
  • Thank you!! Understood and I will wait for few days until there is upgrade. Right now in software and update I see that the proposed is unchecked already. So I believe I do not have to do anything else here, right? And thanks again!! – Maverick Jan 2 at 18:01
  • 1
    I don't have -proposed installed, but I had the same problem. Solved by manually downloading latest virtualbox, still remaining with kernel 5.8.0-34-generic – tonjo Jan 8 at 8:37
  • 1
    @tonjo - this answer applied for only a few days (the time a package is in -proposed). Kernel 5.8.0-34 has already been superseded by 5.8.0-36, so it seems likely you have a different problem and this answer won't help you. – user535733 Jan 8 at 13:26
  • Thanks, but as I said, solved reinstalling. – tonjo Jan 8 at 23:48
5

I had a very similar looking problem after doing a system update today. I removed virtualbox

sudo apt-get remove virtualbox
sudo apt-get autoremove

and then installed virtualbox from https://www.virtualbox.org/wiki/Linux_Downloads which now works. See also https://forums.virtualbox.org/viewtopic.php?f=7&t=99564

2
  • 1
    Nice that it is resolved for you. :) You may want to keep the "proposed" option off in developer option in software update. One experience user advised me this thing to run in to similar problems in future. You can see this in one of the answers in this question. – Maverick Jan 7 at 8:59
  • Kernel 5.8.0-36-generic is now in the official repositories, and unfortunately this error with virtualbox is still there. Installing the downloaded *.deb file (virtualbox.org) using gdebi worked. – PJ Singh Jan 10 at 1:02
0

You can downgrade Linux kernel to version 5.8.0-33 to fix this problem.

First, remove virtualbox and virtualbox-dkms.

sudo apt remove virtualbox virtualbox-dkms

Secondly, remove linux kernel 5.8.0-34

sudo apt remove linux-image-5.8.0-34-generic linux-moudules-5.8.0-34-generic linux-modules-5.8.0-34-generic

Thirdly install linux-kernel 5.8.0-33

sudo apt install linux-generic-hwe-20.04 linux-generic-hwe-20.04-edge

Finally do not forget:

sudo upgrade-grub

then reboot, and install Virtualbox again

sudo apt install virtualbox virtualbox-dkms

If you see Failed to start LSB: VirtualBox Linux kernel module, you need remove all packages related to virtualbox. Then go to Linux_Downloads - Oracle VM VirtualBox to download Virtualbox 6.1.16 and install.

4

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.