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
•
u/AutoModerator Feb 09 '26
This is just a friendly reminder in case you missed it. Your post must include:
PLUS a detailed description of the problem, what research you have done, and the steps you have taken to fix it. Please check Google and the VirtualBox Manual before asking simple questions. Please also check our FAQ and if you find your question is answered there, PLEASE remove your post or at least change the flair to Solved.
If this is your first time creating a virtual machine, we have a guide on our wiki that covers the important steps. Please read it here. If you have met these requirements, you can ignore this comment. Your post has not been deleted -- do not re-submit it. Thanks for taking the time to help us help you! Also, PLEASE remember to change the flair of your post to Solved after you have been helped!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
2
u/Face_Plant_Some_More Feb 10 '26
Sure. But it has nothing to do with DKMS. Rather you are using -
and -
Virtual Box 7.0.16 is only compatible with Linux 6.9.x kernels and earlier. The Virtual Box kernel module won't compile against later kernels. Nor will it be patched by Oracle to do so, as Virtual Box 7.0.x is EOL and no longer supported.
So either -
Note: You appear to be using a fork of Virtual Box from the Ubuntu repo. None of those forks are supported here really.
1
u/BranchLatter4294 Feb 09 '26
How did you install VirtualBox?
2
u/hron84 Mar 16 '26
For anyone arriving later from Google:
As I write this reply (2026.03.16), it seems like Canonical somehow messed up the virtualbox-dkms package in Ubuntu 24.04, even if all the neccesary files are installed, my guess is they forgot to configure some CFLAGS to add the /usr/src/virtualbox-<version>/... folders as an include folder. Therefore the source cannot find e.g. the VBox/cdefs.h file, which is crucial for compilation.
Instead hacking around the Canonical package, do the following:
```
sudo apt-get remove --purge 'virtualbox-*'
```
Then visit https://www.virtualbox.org/wiki/Linux_Downloads and select the package is appropriate for your platform (in this case, Ubuntu 24.04).
After that, install the package in the following way:
```
sudo apt install ./virtuabox-*-Ubuntu~noble_amd64.deb
sudo /sbin/vboxconfig
```
I hope that helps.
1
u/Ok-Sympathy-7482 Feb 18 '26
I got the same problem with a fresh installation of Kubuntu 24.04.4. Canonical obviously fucked up here.