VirtualBox 4.2.x on Ubuntu 12.04

I’m back on Linux, back in trouble as well. Ok so downloading and installing the latest deb file for VirtualBox doesn’t work out of a box.

I found this in the VirtualBox forum. It turns out you need to install these packages first.

sudo apt-get install dkms build-essential linux-headers-generic

Then install the deb file

sudo dpkg -i virtualbox-4.2_4.2.10-84104~Ubuntu~quantal_amd64.deb