50

I install virtualBox on Ubuntu 16.04, but after install and create new virtual Host shows this error:

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.

When I try to run sudo modprobe vboxdrv, I get this error:

$ sudo modprobe vboxdrv
modprobe: ERROR: could not insert 'vboxdrv': Required key not available

How can I address this modprobe vboxdrv error?

Flimm
  • 41,766
mySun
  • 1,971
  • 1
    Do you try ‘sudo modprobe vboxdrv‘ ? – Ali Razmdideh May 31 '17 at 11:01
  • See this question is exactly the same just a few hours ago. Maybe one of the comments will help you aswell since Jimmi hasn't said yet what helped him. – Ziazis May 31 '17 at 11:17
  • @AliRazmdideh OP answered your question in this comment: https://askubuntu.com/questions/920689/how-to-fix-modprobe-vboxdrv-error-in-virtualbox#comment1453951_920713 – Flimm May 23 '23 at 17:07

5 Answers5

90

As the first step run this command:

sudo modprobe vboxdrv

If it's not helpful run these commands:

sudo apt update
sudo apt install --reinstall linux-headers-$(uname -r) virtualbox-dkms dkms

Then reboot your system and after reboot run this command:

sudo modprobe vboxdrv

And if it doesn't work you must disable Secure Boot in your BIOS/UEFI settings because Secure Boot prevents unsigned modules from being loaded.

Zanna
  • 70,465
  • 9
    Hi, After run sudo modprobe vboxdrv, show this error: modprobe: ERROR: could not insert 'vboxdrv': Required key not available – mySun May 31 '17 at 13:08
  • 1
    @mySun Is your problem solved ? If my answer is not be helpful , please read this post instructions to solve Required key not available issue : https://askubuntu.com/questions/760671/could-not-load-vboxdrv-after-upgrade-to-ubuntu-16-04-and-i-want-to-keep-secur – Ali Razmdideh May 31 '17 at 13:39
  • 4
    I read this post and find my problem :-) Thank you. – mySun May 31 '17 at 15:19
  • 2
    I didn't need to reboot but your apt install method did work. – flyingdrifter Nov 06 '17 at 02:58
  • What's the best way to automate it at boot? Should I put it into /usr/lib/modules-load.d? – yuranos Jul 18 '18 at 15:34
  • Or rather in /etc/modules. Does it make sense to do it? Does this module consume a lot of resources? I don't need VirtualBox every day, so it will only make sense if it's an inexpensive operation. – yuranos Jul 18 '18 at 15:40
  • this worked for me +1 – ɹɐqʞɐ zoɹǝɟ Oct 21 '18 at 16:56
  • not works, the first try modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/5.0.0-23-generic – Budi Mulyo Sep 06 '19 at 04:06
  • This worked and solved my vagrant issue after updating my pc to ubuntu 19.10 – exts Mar 09 '20 at 21:30
  • Is it possible that I should not do that after each restart? I put the vboxdrv insinde /etc/modules but I have to run sudo apt install --reinstall linux-headers-$(uname -r) virtualbox-dkms dkms each time – Micha93 Jan 22 '21 at 13:37
4
  1. Uninstall virtualbox-dkms and its configurations by running the below commands:

    sudo apt-get remove virtualbox-dkms
    sudo apt-get remove --purge virtualbox-dkms
    
  2. Install Linux headers and Linux image by running the below command:

    sudo apt-get install -y linux-headers-amd64 linux-image-amd64
    
  3. Install virtualbox-dkms

    sudo apt-get install -y virtualbox-dkms
    
karel
  • 114,770
  • 2
    My system cannot find linux-headers-amd64 or linux-image-amd64 Trying apt dist-upgrade instead. – david.perez Jun 04 '18 at 09:26
  • 1
    linux header installation has to be generic sudo apt install --reinstall linux-headers-$(uname -r) virtualbox-dkms dkms – Nav Nov 23 '18 at 03:16
2

In my case it has to do with UEFI being active. In that case, unsigned kernel modules like vboxdrv aren't loaded.

More info here: Could not load 'vboxdrv' after upgrade to Ubuntu 16.04 (and I want to keep secure boot)

0

Like @david.perez exposed, it can be solved by disabling the UEFI Secure Boot:

  1. do 'Power Off / Restart'
  2. at the very first screen, select 'UEFI settings'
  3. in the Bios interface, browse until 'UEFI' tab
  4. change 'Enabled' to 'Disabled', save and exit
0

I'm using 20.04 and I followed the steps from Zanna described above.

Then I got this error when trying to execute the last command:

Error: modprobe: ERROR: could not insert ‘vboxdrv’: Operation not permitted

I followed this guide to fix the permission error:

https://crazytechgo.com/modprobe-error-could-not-insert-vboxdrv-operation-not-permitted/

Nik
  • 111