Kernel driver not installed (rc=-1908) The VirtualBox Linux kernel driver is either not loaded or not set up correctly
https://askubuntu.com/questions/1564103/kernel-driver-not-installed-rc-1908-the-virtualbox-linux-kernel-driver-is-eit
"Kernel driver not installed (rc=-1908) The VirtualBox Linux kernel driver is either not loaded or not set up correctly"
"…Please reinstall virtualbox-dkms package and load the kernel module by executing 'modprobe vboxdrv' as root."
$ uname -a
Linux AM5 6.17.0-14-generic #14~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jan 15 15:52:10 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
This appears to be a recurring problem with no definitive answer: each time it comes up, a previous solution fails to work and a new answer is needed. I've lost track of how many questions and 'answers' I've read on this.
There must be many thousands of people who rely upon Virtualbox to run other Linux, and especially Windows, on Linux. And many will be on Ubuntu. So I don't understand why there isn't already a fix. I don't even know which update caused it. All of a sudden, VB can't start a virtual machine.
Would subscribing to Ubuntu Pro help?
Perhaps I got a 'phased' update, so most of the rest of you are oblivious of the problem?
NB, I've checked the BIOS: secure boot is DISABLED.
Below is some of what I've tried.
So, first try what it says in the error message:
$ sudo apt reinstall virtualbox-dkms
[sudo] password for alan:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 to upgrade, 0 to newly install, 1 reinstalled, 0 to remove and 38 not to upgrade.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for virtualbox-dkms:amd64
Keep going — maybe the modprobe will work:
$ sudo modprobe vboxdrv
[sudo] password for alan:
alan@AM5:~$
Restart Virtualbox. Try to start virtual machine. Virtual machine immediately goes from 'Saved' to 'Aborted Saved'.
Powering VM up...
VM Name: ...
The VM session was aborted.
Result code: NS_ERROR_FAILURE (0X80004005)
Component: SessionMachine
Interface: ISession {c044...}
Thank goodness I have a backup.
Edit grub and roll back to old kernel: nothing changes.
Let's try update/upgrade:
sudo apt upgrade
[...]
Setting up virtualbox-dkms (7.0.16-dfsg-2ubuntu1.1) ...
Removing old virtualbox-7.0.16 DKMS files...
Module virtualbox-7.0.16 for kernel 6.14.0-37-generic (x86_64).
Before uninstall, this module version was ACTIVE on this kernel.
vboxdrv.ko.zst:
- Uninstallation
- Deleting from: /lib/modules/6.14.0-37-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxnetadp.ko.zst:
- Uninstallation
- Deleting from: /lib/modules/6.14.0-37-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxnetflt.ko.zst:
- Uninstallation
- Deleting from: /lib/modules/6.14.0-37-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
depmod...
Deleting module virtualbox-7.0.16 completely from the DKMS tree.
Loading new virtualbox-7.0.16 DKMS files...
Building for 6.14.0-37-generic 6.17.0-14-generic
Building initial module for 6.14.0-37-generic
Done.
vboxdrv.ko.zst:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/6.14.0-37-generic/updates/dkms/
vboxnetadp.ko.zst:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/6.14.0-37-generic/updates/dkms/
vboxnetflt.ko.zst:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/6.14.0-37-generic/updates/dkms/
depmod...
Building initial module for 6.17.0-14-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/virtualbox-dkms.0.crash'
Error! Bad return status for module build on kernel: 6.17.0-14-generic (x86_64)
Consult /var/lib/dkms/virtualbox/7.0.16/build/make.log for more information.
dpkg: error processing package virtualbox-dkms (--configure):
installed virtualbox-dkms package post-installation script subprocess returned error exit status 10
[...]
errors were encountered while processing:
virtualbox-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
Consult /var/lib/dkms/virtualbox/7.0.16/build/make.log for more information.
I forgot to capture this before attempting to reinstall VB --- it's gone.
Tried to install a later version of VB direct from Oracle: failed.
Now I get: "Failed to acquire the VirtualBox COM object. The application will now terminate."
Yes, I know, I should have taken a more systematic approach. But it's difficult to write this on the machine you're trying to fix. Especially as some 'answers' have such enticing 'solutions'...
To understand the 'Edit's, please see the Comments
Edit 1
Managed to install VB 7.1
Same original problem, but now it says to run /sbin/vboxconfig
$ sudo /sbin/vboxconfig
[sudo] password for alan:
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what went wrong.
There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root. If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.
alan@AM5:~$
Look at /var/log/vbox-setup.log to find out what went wrong.
Building the main VirtualBox module.
Error building the module:
make V=1 CONFIG_MODULE_SIG= CONFIG_MODULE_SIG_ALL= -C /lib/modules/6.17.0-14-generic/build M=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j32
modules
make[1]: warning: -j32 forced in submake: resetting jobserver mode.
make -C /tmp/vbox.0 \
-f /usr/src/linux-headers-6.17.0-14-generic/Makefile modules
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
You are using: gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
[...]
[several "fatal error" messages:]
VBox/cdefs.h: No such file or directory
VBox/sup.h: No such file or directory
iprt/string.h: No such file or directory
internal/iprt.h: No such file or directory
the-linux-kernel.h: No such file or directory
$ ll /usr/bin | grep gcc
lrwxrwxrwx 1 root root 23 Sep 4 2024 gcc-13 -> x86_64-linux-gnu-gcc-13*
So it would appear the warning about the compiler is a red herring.
Edit 2
$ dpkg -l *virtualbox*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============================-==========================-============-==============================================
ic virtualbox 7.0.16-dfsg-2ubuntu1.1 amd64 x86 virtualization solution - base binaries
un virtualbox-2.0 <none> <none> (no description available)
un virtualbox-2.1 <none> <none> (no description available)
un virtualbox-2.2 <none> <none> (no description available)
un virtualbox-3.0 <none> <none> (no description available)
un virtualbox-3.1 <none> <none> (no description available)
un virtualbox-3.2 <none> <none> (no description available)
un virtualbox-4.0 <none> <none> (no description available)
un virtualbox-4.1 <none> <none> (no description available)
un virtualbox-4.2 <none> <none> (no description available)
un virtualbox-4.3 <none> <none> (no description available)
un virtualbox-5.0 <none> <none> (no description available)
un virtualbox-5.1 <none> <none> (no description available)
un virtualbox-5.2 <none> <none> (no description available)
un virtualbox-6.0 <none> <none> (no description available)
un virtualbox-6.1 <none> <none> (no description available)
un virtualbox-7.0 <none> <none> (no description available)
ii virtualbox-7.1 7.1.8-168469~Ubuntu~noble amd64 Oracle VirtualBox
rc virtualbox-7.2 7.2.6-172322~Ubuntu~plucky amd64 Oracle VirtualBox
un virtualbox-dkms <none> <none> (no description available)
rc virtualbox-ext-pack 7.0.16-1 all extra capabilities for VirtualBox, downloader.
un virtualbox-guest-additions-iso <none> <none> (no description available)
un virtualbox-guest-modules <none> <none> (no description available)
un virtualbox-modules <none> <none> (no description available)
un virtualbox-ose <none> <none> (no description available)
un virtualbox-qt <none> <none> (no description available)
un virtualbox-source <none> <none> (no description available)
alan@AM5:~$
$ sudo dkms status
[sudo] password for alan:
alan@AM5:~$
(no output from dkms status)
Yes, linux-headers-6.17.0-14-generic installed:
$ sudo apt show linux-headers-6.17.0-14-generic
Package: linux-headers-6.17.0-14-generic
Version: 6.17.0-14.14~24.04.1
Priority: optional
Section: devel
Source: linux-hwe-6.17
Origin: Ubuntu
Maintainer: Ubuntu Kernel Team <kernel-team@lists.ubuntu.com>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 30.6 MB
Provides: linux-headers, linux-headers-3.0
Depends: linux-hwe-6.17-headers-6.17.0-14, libc6 (>= 2.38), libdw1t64 (>= 0.171), libelf1t64 (>= 0.144), libgcc-s1 (>= 4.2), libssl3t64 (>= 3.0.0), zlib1g (>= 1:1.2.3.3)
Download-Size: 3,979 kB
APT-Manual-Installed: yes
APT-Sources: http://gb.archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages
Description: Linux kernel headers for version 6.17.0
This package provides kernel header files for version 6.17.0.
.
This is for sites that want the latest kernel headers. Please read
/usr/share/doc/linux-headers-6.17.0-14/debian.README.gz for details.
alan@AM5:~$
Edit 3
$ sudo apt purge virtualbox=7.0.16-dfsg-2ubuntu1.1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED
virtualbox*
0 to upgrade, 0 to newly install, 1 to remove and 12 not to upgrade.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
(Reading database ... 479790 files and directories currently installed.)
Purging configuration files for virtualbox (7.0.16-dfsg-2ubuntu1.1) ...
$ sudo apt purge virtualbox-ext-pack=7.0.16-1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED
virtualbox-ext-pack*
0 to upgrade, 0 to newly install, 1 to remove and 12 not to upgrade.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
(Reading database ... 479788 files and directories currently installed.)
Purging configuration files for virtualbox-ext-pack (7.0.16-1) ...
$ sudo apt reinstall ./virtualbox-7.1_7.1.8-168469~Ubuntu~noble_amd64.deb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'virtualbox-7.1' instead of './virtualbox-7.1_7.1.8-168469~Ubuntu~noble_amd64.deb'
0 to upgrade, 0 to newly install, 1 reinstalled, 0 to remove and 12 not to upgrade.
Need to get 0 B/108 MB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 /tmp/virtualbox-7.1_7.1.8-168469~Ubuntu~noble_amd64.deb virtualbox-7.1 amd64 7.1.8-168469~Ubuntu~noble [108 MB]
Preconfiguring packages ...
(Reading database ... 479788 files and directories currently installed.)
Preparing to unpack .../virtualbox-7.1_7.1.8-168469~Ubuntu~noble_amd64.deb ...
Unpacking virtualbox-7.1 (7.1.8-168469~Ubuntu~noble) over (7.1.8-168469~Ubuntu~noble) ...
Setting up virtualbox-7.1 (7.1.8-168469~Ubuntu~noble) ...
info: The group `vboxusers' already exists as a system group. Exiting.
vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what went wrong.
There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root. If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.
Processing triggers for desktop-file-utils (0.27-2build1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1.1ubuntu3) ...
Processing triggers for mate-menus (1.26.1-1build3) ...
Processing triggers for shared-mime-info (2.4-4) ...
Processing triggers for bamfdaemon (0.5.6+22.04.20220217-0ubuntu5) ...
Rebuilding /usr/share/applications/bamf-2.index...
alan@AM5:/tmp$
Same fatal errors: "no such file or directory"
NB 7.1 not in repository, only have .deb from Oracle (sorry, didn't make that clear).
Edit 4
Reinstall of VB 7.1 from within ~/Downloads/Virtualbox/
alan@AM5:~/Downloads/Virtualbox$ sudo apt reinstall ./virtualbox-7.1_7.1.8-168469~Ubuntu~noble_amd64.deb
[sudo] password for alan:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'virtualbox-7.1' instead of './virtualbox-7.1_7.1.8-168469~Ubuntu~noble_amd64.deb'
0 to upgrade, 0 to newly install, 1 reinstalled, 0 to remove and 12 not to upgrade.
Need to get 0 B/108 MB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 /home/alan/Downloads/Virtualbox/virtualbox-7.1_7.1.8-168469~Ubuntu~noble_amd64.deb virtualbox-7.1 amd64 7.1.8-168469~Ubuntu~noble [108 MB]
Preconfiguring packages ...
(Reading database ... 479788 files and directories currently installed.)
Preparing to unpack .../virtualbox-7.1_7.1.8-168469~Ubuntu~noble_amd64.deb ...
Unpacking virtualbox-7.1 (7.1.8-168469~Ubuntu~noble) over (7.1.8-168469~Ubuntu~noble) ...
Setting up virtualbox-7.1 (7.1.8-168469~Ubuntu~noble) ...
info: The group `vboxusers' already exists as a system group. Exiting.
vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what went wrong.
There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root. If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.
Processing triggers for desktop-file-utils (0.27-2build1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1.1ubuntu3) ...
Processing triggers for mate-menus (1.26.1-1build3) ...
Processing triggers for shared-mime-info (2.4-4) ...
Processing triggers for bamfdaemon (0.5.6+22.04.20220217-0ubuntu5) ...
Rebuilding /usr/share/applications/bamf-2.index...
N: Download is performed unsandboxed as root, as file '/home/alan/Downloads/Virtualbox/virtualbox-7.1_7.1.8-168469~Ubuntu~noble_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
alan@AM5:~/Downloads/Virtualbox$
Re-run of /sbin/vboxconfig
alan@AM5:~/Downloads/Virtualbox$ sudo /sbin/vboxconfig
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what went wrong.
There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root. If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.
alan@AM5:~/Downloads/Virtualbox$
$ grep -i "no such" /var/log/vbox-setup.log
linux/../SUPDrvInternal.h:47:10: fatal error: VBox/cdefs.h: No such file or directory
SUPDrvInternal.h:47:10: fatal error: VBox/cdefs.h: No such file or directory
SUPDrvInternal.h:47:10: fatal error: VBox/cdefs.h: No such file or directory
SUPDrvInternal.h:47:10: fatal error: VBox/cdefs.h: No such file or directory
SUPDrvInternal.h:47:10: fatal error: VBox/cdefs.h: No such file or directory
SUPLibAll.c:41:10: fatal error: VBox/sup.h: No such file or directory
common/string/strformatrt.c:42:10: fatal error: iprt/string.h: No such file or directory
combined-agnostic1.c:38:10: fatal error: internal/iprt.h: No such file or directory
combined-agnostic2.c:38:10: fatal error: internal/iprt.h: No such file or directory
combined-os-specific.c:38:10: fatal error: the-linux-kernel.h: No such file or directory
Edit 5
alan@AM5:~/Downloads/Virtualbox$ ls -al virtualbox-7.1_7.1.8-168469~Ubuntu~noble_amd64.deb
-rw-rw-r-- 1 alan alan 108093464 May 3 2025 virtualbox-7.1_7.1.8-168469~Ubuntu~noble_amd64.deb
$ dpkg -l *headers* | grep ii
ii linux-headers-6.11.0-21-generic 6.11.0-21.21~24.04.1 amd64 Linux kernel headers for version 6.11.0 on 64 bit x86 SMP
ii linux-headers-6.11.0-29-generic 6.11.0-29.29~24.04.1 amd64 Linux kernel headers for version 6.11.0 on 64 bit x86 SMP
ii linux-headers-6.14.0-37-generic 6.14.0-37.37~24.04.1 amd64 Linux kernel headers for version 6.14.0
ii linux-headers-6.17.0-14-generic 6.17.0-14.14~24.04.1 amd64 Linux kernel headers for version 6.17.0
ii linux-headers-6.8.0-100 6.8.0-100.100 all Header files related to Linux kernel version 6.8.0
ii linux-headers-6.8.0-100-generic 6.8.0-100.100 amd64 Linux kernel headers for version 6.8.0 on 64 bit x86 SMP
ii linux-headers-generic 6.8.0-100.100 amd64 Generic Linux kernel headers
ii linux-headers-generic-hwe-24.04 6.17.0-14.14~24.04.1 amd64 Generic Linux kernel headers
ii linux-hwe-6.11-headers-6.11.0-21 6.11.0-21.21~24.04.1 all Header files related to Linux kernel version 6.11.0
ii linux-hwe-6.11-headers-6.11.0-29 6.11.0-29.29~24.04.1 all Header files related to Linux kernel version 6.11.0
ii linux-hwe-6.14-headers-6.14.0-37 6.14.0-37.37~24.04.1 all Header files related to Linux kernel version 6.14.0
ii linux-hwe-6.17-headers-6.17.0-14 6.17.0-14.14~24.04.1 all Header files related to Linux kernel version 6.17.0
alan@AM5:~/Downloads/Virtualbox$
$ sudo apt purge virtualbox-7.1
[sudo] password for alan:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
liblzf1 libqt6core6t64 libqt6dbus6t64 libqt6gui6t64 libqt6help6 libqt6network6t64 libqt6opengl6t64 libqt6printsupport6t64
libqt6qml6 libqt6qmlmodels6 libqt6quick6 libqt6sql6-sqlite libqt6sql6t64 libqt6statemachine6 libqt6waylandclient6
libqt6waylandcompositor6 libqt6waylandeglclienthwintegration6 libqt6waylandeglcompositorhwintegration6 libqt6widgets6t64
libqt6wlshellintegration6 libqt6xml6t64 libsdl-ttf2.0-0 libsdl1.2debian libtpms0 libts0t64 qt6-gtk-platformtheme
qt6-qpa-plugins qt6-translations-l10n qt6-wayland
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED
virtualbox-7.1*
0 to upgrade, 0 to newly install, 1 to remove and 12 not to upgrade.
After this operation, 242 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 479788 files and directories currently installed.)
Removing virtualbox-7.1 (7.1.8-168469~Ubuntu~noble) ...
Processing triggers for desktop-file-utils (0.27-2build1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1.1ubuntu3) ...
Processing triggers for mate-menus (1.26.1-1build3) ...
Processing triggers for shared-mime-info (2.4-4) ...
Processing triggers for bamfdaemon (0.5.6+22.04.20220217-0ubuntu5) ...
Rebuilding /usr/share/applications/bamf-2.index...
(Reading database ... 479039 files and directories currently installed.)
Purging configuration files for virtualbox-7.1 (7.1.8-168469~Ubuntu~noble) ...
dpkg: warning: while removing virtualbox-7.1, directory '/usr/local' not empty so not removed
alan@AM5:~/Downloads/Virtualbox$
Synaptic used to install virtualbox 7.0.16-dfsg-2ubuntu1.1
Synaptic also chose and installed virtualbox-dkms and virtualbox-qt


Virtualbox will run, but I'm back to the original problem.
Edit 6
Synaptic search for "linux-headers-generic":
Looks like the 6.8 headers are still installed.
Uninstall?
From HWE kernels in Ubuntu docs: "HWE (Hardware Enablement) kernels are only enabled on Ubuntu long-term support (LTS) releases...By default, Ubuntu Desktop installations of 24.04 default to tracking the HWE stack.".
alan@AM5:~$ uname -r
6.17.0-14-generic
alan@AM5:~$
alan@AM5:~$ dkms status
virtualbox/7.0.16: added
alan@AM5:~$
Edit 7
alan@AM5:~$ sudo dkms build virtualbox/7.0.16
[sudo] password for alan:
Sign command: /usr/bin/kmodsign
Signing key: /var/lib/shim-signed/mok/MOK.priv
Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der
Building module:
Cleaning build area...
make -j32 KERNELRELEASE=6.17.0-14-generic -C /lib/modules/6.17.0-14-generic/build M=/var/lib/dkms/virtualbox/7.0.16/build...(bad exit status: 2)
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/virtualbox-dkms.0.crash'
Error! Bad return status for module build on kernel: 6.17.0-14-generic (x86_64)
Consult /var/lib/dkms/virtualbox/7.0.16/build/make.log for more information.
alan@AM5:~$
The resulting make.log:
/var/lib/dkms/virtualbox/7.0.16/build/make.log [pastebin]
Output from:
sudo apt install build-essential dkms linux-headers-$(uname -r) [pastebin]
alan@AM5:~$ sudo /sbin/vboxconfig
[sudo] password for alan:
sudo: /sbin/vboxconfig: command not found
alan@AM5:~$
alan@AM5:~$ sudo modprobe vboxdrv
modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/6.17.0-14-generic
alan@AM5:~$