Out of curiosity, took a shot at installing VBox from repo into a test box. The simple apt install virtualbox wasn't enough. Piecing together notes in Synaptic, ended up with apt install virtualbox virtualbox-qt virtualbox-ext-pack libqt5opengl5
, which also brings in a few other packages. Seems to work, at least was able to Add and Start one of my existing VMs. I still recommend direct install from Oracle, but you could try doing it this way if you like. Bear in mind that I've not run VBox this way, though, so can't promise there isn't something missing.
ETA: This morning, did a second experiment, setting up a new VM. Worked fine until rebooted the installed system to insert the Guest Additions CD. Not available. Notably, we've had several threads about problems with guest additions in the repo version of VBox. Shutdown the VM, then install virtualbox-guest-additions-iso. Still won't insert. So, pursue the option (also offered the first time) to download from Oracle. That works, and even is scripted to insert the virtual CD, which then ran as usual. Bottom line, at least twice as much work as direct install. And I still don't know whether I have everything.
ETA2: With a little research this evening, was able to find on Stack Exchange
an explanation of how one is supposed to use the virtualbox-guest-additions-iso package. Would be nice if Ubuntu had a tutorial on how to set up the repo version of VirtualBox, but if there is one I can't find it. Whereas, with direct install, I have a very nice Oracle manual
. Another reason, IMHO, to use direct install rather than repo. YMMV.