"ERROR (dkms apport): kernel package linux-headers-5.8.0-34-generic is not supported" while installing Virtualbox on Ubuntu 20.04 LTS
Solution 1
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.
Solution 2
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
Kulfy
Born in June, 2015, I am a 5 year old pug (good boi?), whose name is derived from a dessert (Not to be confused with @dessert). I use Ubuntu 16.04, 18.04 and 20.04 with my little paws (believe me). I generally give instructions to my master to write up answers or ask questions as I dictate him (typing could be boring sometimes). For hugs and pugs ping me @ AUGR or ROLD or [email protected]. Being a pug I love Kisses. ;-) Never let them know where your food is 😉
Updated on September 18, 2022Comments
-
Kulfy over 1 year
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)
-
Admin over 3 yearsThank 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!!
-
Admin over 3 yearsHi!! I tried to do this but on the second command I get the following error message: i.postimg.cc/TYZGDw4r/Screenshot-from-2021-01-04-16-59-30.png
-
Admin over 3 yearsNow when I run sudo apt upgrade the following error comes: i.postimg.cc/zvQRRc3D/Screenshot-from-2021-01-04-18-51-02.png
-
Btxs over 3 yearsYou need remove all virtualbox package, including virtualbox-dkms and virtualbox-qt, and download virtualbox 6.1 [link]download.virtualbox.org/virtualbox/6.1.16/… and use dpkg install
-
Admin over 3 yearsAfter some trial and error, I have succeeded in completely removing the virtualbox and reinstalling it from Oracle repository. It resolved the problem. Now I have another issue which I am posting in my new question. Thank you!
-
Admin over 3 yearsNice 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.
-
tonjo over 3 yearsI 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
-
user535733 over 3 years@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.
-
tonjo over 3 yearsThanks, but as I said, solved reinstalling.
-
Enterprise over 3 yearsKernel 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) usinggdebi
worked.