Need to upgrade Virtualbox when upgrading Ubuntu

To fix an error about a missing kernel driver that keeps telling you to install dkms and run /sbin/vboxconfig, follow the process below.

Fix error about conflicting Virtualbox versions

This error usually happens when going between major or point releases–say Virtualbox 5.0->5.1 or 4.3->5.1). It can also happen when upgrading Ubuntu say from 14.04 to 16.04.

  1. uninstall your old Virtualbox by

     sudo apt remove virtualbox or
    
     sudo dpkg -r virtualbox-4.3
    
  2. reinstall new Virtualbox

     sudo gdebi virtualbox*.deb