Ubuntu – Problem with the installation of VirtualBox


I am trying to install virtualbox and make it work but it doesn't seem like I can. In the image
you can see the output.

Command line output

If I run VBoxManage --version I get:

WARNING: The character device /dev/vboxdrv does not exist.
Please install the virtualbox-dkms package and the appropriate
headers, most likely linux-headers-generic.

You will not be able to start VMs until this problem is fixed.

But virtualbox-dkms is already installed and at the latest version. So I tried to reinstall it and i got this:

cli output 2

Any help will be appreciated.


The output after reconfigure (@M.Tarun suggestion):

cli output 3


Also installed the sources as @Hmayag instructed, purged virtualbox and installed it again but I got the same problem.

Best Answer

Basically after you install those two packages you also need to do the reconfiguration:

sudo dpkg-reconfigure virtualbox-dkms
sudo dpkg-reconfigure virtualbox
sudo modprobe vboxdrv

And to fix eth0:

sudo modprobe vboxnetflt