Fix VirtualBox "Failed, trying without DKMS" Error on Linux
When you install or start VirtualBox on a Linux distribution, you may encounter the error message "Failed, trying without DKMS". This error indicates that the DKMS (Dynamic Kernel Module Support) package is not installed on your system.
What is DKMS?
DKMS is a framework that allows kernel modules to be dynamically rebuilt when a new kernel is installed. VirtualBox relies on kernel modules (such as vboxdrv) to interface with your hardware. Without DKMS, these modules will not be rebuilt automatically after kernel updates, causing VirtualBox to fail.
How to fix it
Ubuntu / Debian
-
Open a Terminal.
-
Run the following command:
sudo apt-get install dkms -
Wait for the package to download and install.
-
Try opening VirtualBox again.
Fedora / RHEL
-
Open a Terminal.
-
Run the following command:
sudo yum install dkms -
Wait for the package to download and install.
-
Try opening VirtualBox again.
Still not working?
If VirtualBox still fails after installing DKMS, you may also need to install the kernel headers for your running kernel. On Ubuntu, run:
sudo apt-get install linux-headers-$(uname -r)
On Fedora:
sudo yum install kernel-devel-$(uname -r)
After installing the headers, reconfigure VirtualBox with:
sudo /sbin/vboxconfig
This should rebuild the VirtualBox kernel modules and resolve the issue.