Virtualbox Kernel driver not installed [duplicate]

I tried to use my Virtual Box and this is the error I received - (I just updated to the new Ubuntu also) and I am VERY new at this Linux OS.

Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing

'/etc/init.d/vboxdrv setup'

as root. Users of Ubuntu, Fedora or Mandriva should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.

Virtualbox Kernel driver not installed


Solution 1:

Re-install virtualbox-dkms package first

sudo apt-get autoremove virtualbox-dkms
sudo apt-get install build-essential linux-headers-`uname -r` dkms virtualbox-dkms

After that You can enable it manually

sudo modprobe vboxdrv
sudo modprobe vboxnetflt

Solution 2:

Most probably all you have to do is run

sudo apt-get install dkms

(or install dkms from the software center)

and then run

sudo /etc/init.d/vboxdrv setup

and write your password.

if you have any error with this commands use this one

sudo modprobe vboxdrv