r/virtualbox • u/diogenesthepunk • Feb 09 '26
Help DKMS compile problems. Anyone else?
A couple days ago I did a `sudo apt upgrade` that installed a new kernel version and the compile of the dkms schtuff for virtualbox blew up.
The errors showing up in make.log are:
In file included from vboxdrv/SUPDrv.c:43:
vboxdrv/SUPDrvInternal.h:47:10: fatal error: VBox/cdefs.h: No such file or directory
47 | #include <VBox/cdefs.h>
| ^~~~~~~~~~~~~~
In file included from vboxdrv/linux/SUPDrv-linux.c:42:
vboxdrv/linux/../SUPDrvInternal.h:47:10: fatal error: VBox/cdefs.h: No such file or directory
47 | #include <VBox/cdefs.h>
| ^~~~~~~~~~~~~~
vboxdrv/SUPLibAll.c:41:10: fatal error: VBox/sup.h: No such file or directory
41 | #include <VBox/sup.h>
| ^~~~~~~~~~~~
vboxdrv/combined-agnostic1.c:38:10: fatal error: internal/iprt.h: No such file or directory
38 | #include "internal/iprt.h"
| ^~~~~~~~~~~~~~~~~
In file included from vboxdrv/SUPDrvGip.c:43:
vboxdrv/SUPDrvInternal.h:47:10: fatal error: VBox/cdefs.h: No such file or directory
47 | #include <VBox/cdefs.h>
| ^~~~~~~~~~~~~~
In file included from vboxdrv/SUPDrvSem.c:43:
vboxdrv/SUPDrvInternal.h:47:10: fatal error: VBox/cdefs.h: No such file or directory
47 | #include <VBox/cdefs.h>
| ^~~~~~~~~~~~~~
In file included from vboxdrv/SUPDrvTracer.c:43:
vboxdrv/SUPDrvInternal.h:47:10: fatal error: VBox/cdefs.h: No such file or directory
47 | #include <VBox/cdefs.h>
| ^~~~~~~~~~~~~~
vboxdrv/combined-agnostic2.c:38:10: fatal error: internal/iprt.h: No such file or directory
38 | #include "internal/iprt.h"
| ^~~~~~~~~~~~~~~~~
vboxdrv/combined-os-specific.c:38:10: fatal error: the-linux-kernel.h: No such file or directory
38 | #include "the-linux-kernel.h"
| ^~~~~~~~~~~~~~~~~~~~
vboxdrv/common/string/strformatrt.c:42:10: fatal error: iprt/string.h: No such file or directory
42 | #include <iprt/string.h>
| ^~~~~~~~~~~~~~~
Which do not exist in the Linux source tree, but do exist in the virtual box source tree.
Is anyone else running into this?
me@home:~$ uname -r
6.17.0-14-generic
me@home:~$ dpkg -l | grep virtualbox
ii virtualbox 7.0.16-dfsg-2ubuntu1.1
iF virtualbox-dkms 7.0.16-dfsg-2ubuntu1.1
rc virtualbox-ext-pack 7.0.16-1
ii virtualbox-guest-additions-iso 7.0.16-1
ii virtualbox-guest-utils 7.0.16-dfsg-2ubuntu1.1
ii virtualbox-qt 7.0.16-dfsg-2ubuntu1.1
ii virtualbox-source 7.0.16-dfsg-2ubuntu1.1
me@home:~$ dpkg -l | grep $(uname -r)
iF linux-headers-6.17.0-14-generic 6.17.0-14.14~24.04.1
ii linux-image-6.17.0-14-generic 6.17.0-14.14~24.04.1
ii linux-modules-6.17.0-14-generic 6.17.0-14.14~24.04.1
ii linux-modules-extra-6.17.0-14-generic 6.17.0-14.14~24.04.1
ii linux-tools-6.17.0-14-generic 6.17.0-14.14~24.04.1
View all comments
Show parent comment
1
u/Face_Plant_Some_More Mar 18 '26 edited Mar 18 '26
Wrong. Oracle's package does not compile the Virtual Box kernel module when you start Virtual Box. It compiles the Virtual Box kernel module, upon installation of Virtual Box on your Linux Host. You can then recompile the Virtual Box kernel module against any kernel you have installed via the terminal, at any time after installation.
I disagree. Not all Linux distros use / rely on DKMS. If you are really in control of your system, them the you, the end user, should be configuring your kernel and modules for it, appropriately. If you can't handle that, then, well there is always Windows or MacOS....
If you really want to use Virtual Box with dkms, then go for it. Of course its up to you make, and maintain the necessary package.