Linux: The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv

By | 03/05/2019
 

After each new VirtualBox installation – I’m stepping on the same rake again and again and have to go to Google to ask:

The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv

Attempt to load vboxdrv manually also provides the error:

[simterm]

$ sudo modprobe vboxdrv
modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/4.20.13-arch1-1-ARCH

[/simterm]

And looks like kernel version is correct, and PC was rebooted:

[simterm]

$ uname -r
4.20.13-arch1-1-ARCH

[/simterm]

And rcvboxdrv didn’t help (expected, however):

[simterm]

$ sudo rcvboxdrv
Unloading modules: 
Loading modules: modprobe: FATAL: Module vboxnetadp not found in directory /lib/modules/4.20.13-arch1-1-ARCH
modprobe: FATAL: Module vboxnetflt not found in directory /lib/modules/4.20.13-arch1-1-ARCH
modprobe: FATAL: Module vboxpci not found in directory /lib/modules/4.20.13-arch1-1-ARCH
modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/4.20.13-arch1-1-ARCH

[/simterm]

And each time the same thought – dufuck?!?

The solution is, suddenly – install the linux-headers – always forgetting about it:

[simterm]

$ sudo pacman -S linux-headers

[/simterm]

Which includes all the necessary files:

[simterm]

$ pacman -Ql linux-headers | grep vbox
linux-headers /usr/lib/modules/4.20.13-arch1-1-ARCH/build/drivers/staging/vboxvideo/
linux-headers /usr/lib/modules/4.20.13-arch1-1-ARCH/build/drivers/staging/vboxvideo/Kconfig
linux-headers /usr/lib/modules/4.20.13-arch1-1-ARCH/build/drivers/virt/vboxguest/
linux-headers /usr/lib/modules/4.20.13-arch1-1-ARCH/build/drivers/virt/vboxguest/Kconfig
linux-headers /usr/lib/modules/4.20.13-arch1-1-ARCH/build/include/config/drm/vboxvideo.h
linux-headers /usr/lib/modules/4.20.13-arch1-1-ARCH/build/include/config/vboxguest.h
linux-headers /usr/lib/modules/4.20.13-arch1-1-ARCH/build/include/linux/vbox_utils.h
linux-headers /usr/lib/modules/4.20.13-arch1-1-ARCH/build/include/uapi/linux/vbox_err.h
linux-headers /usr/lib/modules/4.20.13-arch1-1-ARCH/build/include/uapi/linux/vbox_vmmdev_types.h
linux-headers /usr/lib/modules/4.20.13-arch1-1-ARCH/build/include/uapi/linux/vboxguest.h

[/simterm]

Also, it’s set as an optional dependency for virtualbox-guest-dkms and virtualbox-host-dkms packages.

Load modules again:

[simterm]

$ sudo rcvboxdrv
Unloading modules: 
Loading modules: vboxnetadp vboxnetflt vboxpci vboxdrv

[/simterm]

And run your VirtualBox.

Done.