Question: I am having issues trying to run Virtual Box; which are the "`appropiate headers"`??

```
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.

```

I have installed `virtualbox-dkms` package, but I have no idea about the headers.

Also when trying to run a VM

> 
> 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 install virtualbox-dkms package and load the kernel module by executing
> 
> 
> 
> ```
> 'modprobe vboxdrv'
> 
> ```
> 
> as root. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.
> 
> 
> where: `suplibOsInit` what: `3 VERR_VM_DRIVER_NOT_INSTALLED (-1908)` - The support driver is not installed. On Linux, open returned ENOENT. 
> 
> 
> 

I cannot run `modprobe vboxdrv` (yes, I run it with `sudo`)

```
modprobe: ERROR: could not insert 'vboxdrv': Operation not permitted

```

I think this is a common question but cannot find answers for Ubuntu 16.04, just outdated ones.

**UPDATE**

`linux-headers-generic` is installed but it still doesn't work.

Answer: 
To install the headers do

```
sudo apt install linux-headers-generic

```
Install/Check Virtualbox Driver
===============================

The installation of the Virtualbox drivers can fail for several reasons. First check if the kernel modules have been create:

```
$ ls -la /lib/modules/$(uname -r)/misc
total 696
drwxr-xr-x 2 root root   4096 Mar  7 16:02 .
drwxr-xr-x 6 root root   4096 Mar  7 16:02 ..
-rw-r--r-- 1 root root 600232 Mar  7 16:02 vboxdrv.ko
-rw-r--r-- 1 root root  16204 Mar  7 16:02 vboxnetadp.ko
-rw-r--r-- 1 root root  43134 Mar  7 16:02 vboxnetflt.ko
-rw-r--r-- 1 root root  39959 Mar  7 16:02 vboxpci.ko

```

If the modules are missing run `vboxconfig` manual:

```
$ sudo vboxconfig 
## ... some output ###
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.

```

`vboxconfig` will produce some useful output, if there are errors.

After that check if virtualbox is working properly with the module.

```
$ sudo vboxmanage --version
5.2.8r121009

```