VirtualBox problem: Kernel module is not loaded
First make sure you have these packages installed:
$ sudo apt-get install dkms build-essential linux-headers-`uname -r`
If installing the above does not solve the issue you might have a kernel version greater than 4.4.0-20
which enforces that unsigned kernel modules are not to be allowed to run with Secure Boot
enabled in BIOS. In this case you can do one of the following:
- Disable
Secure Boot
in your BIOS settings
OR
- Sign the VirtualBox modules as described in this post https://askubuntu.com/a/768310/94759
After run this command, my VirtualBox is working:
sudo apt install -f
sudo apt-get install --reinstall virtualbox
...is what did it for me. Hope this helps!
This command worked for me
sudo /etc/init.d/vboxdrv setup
Next I got following error
The VirtualBox VM was created with a user that doesn't match the
current user running Vagrant. VirtualBox requires that the same user
is used to manage the VM that was created. Please re-run Vagrant with
that user. This is not a Vagrant issue.
The UID used to create the VM was: 0
Your UID is: 1000
That got solved by running vagrant up command with root access (sudo).
this should fix the issue with VirtualBox Version: 5.1
Just install linux-headers
and run vboxconfig
again
#> sudo apt-get install dkms build-essential linux-headers-`uname -r`
#> sudo /sbin/vboxconfig