"ERROR (dkms apport): kernel package linux-headers-5.8.0-34-generic is not supported" while installing Virtualbox on Ubuntu 20.04 LTS

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


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.