I have installed virtual box in my device using sudo apt install virtualbox-qt
command.
But when I run virtualbox
command or virtualbox --version
command it gives me this error:
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 searched a solution from the internet but it didn't work for me. How should I solve this?
update
when I run sudo dpkg-reconfigure virtualbox-dkms
U receive this error:
It clearly states that you need to install the virtualbox-dkms
packages. You can follow these steps to solve the problem.
sudo apt-get install virtualbox-dkms
sudo dpkg-reconfigure virtualbox-dkms sudo dpkg-reconfigure virtualbox
sudo apt-get install linux-headers-generic
You can refer to this Virtualbox Wiki if any of the above won't work. Also, you may want to check this similar problem on Ubuntu 14.04
The only thing that helped in my case was disabling the Ubuntu Secure Boot
I will quote an answer from Askubuntu:"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"
Link to the Answer: https://askubuntu.com/questions/777308/virtualbox-problem-kernel-module-is-not-loaded"
Link how to disable Secure Boot: http://itadminguide.com/disable-secure-boot-in-ubuntu/
After this you will most likely have another error but with Minikube, and to fix you'll have to Enable enable Virtualization in Bios
link: https://github.com/kubernetes/minikube/issues/5456
Try this:
apt install --reinstall linux-headers-$(uname -r) virtualbox-dkms dkms
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With