Install Virtualbox on Ubuntu 16.04 LTS

Solution 1:

I don't think I had to do any of that on Ubuntu > 16.04. I would try the version in Ubuntu repositories. Simply install it from the Ubuntu Software or run the command:

sudo apt-get install virtualbox

You might want to undo any changes to the software sources.list that you have done first.

Solution 2:

Remove older version of virutalbox if it's installed in the system

sudo apt remove virtualbox

Add PPA to sources.list

sudo nano /etc/apt/sources.list

Add this file to the end of the file and do Ctrl+X to exit nano

deb http://download.virtualbox.org/virtualbox/debian xenial contrib

Fetch the GPG key

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -

Install the package

sudo apt update 
sudo apt install virtualbox-5.1