I recommend you remove the version of VirtualBox that you installed (from the Ubuntu repositories?) and instead follow the instructions here to add the Oracle repository to your system. That version is always up-to-date (I'm on 6.1.16), and when it is installed it brings in all the needed dependencies to build kernel modules with dkms.
https://www.virtualbox.org/wiki/Linu...xdistributions
Bookmarks