Cannot install VirtualBox

I’ve an error when I try to install virtualbox-dkms package.

The file /var/lib/dkms/virtualbox/7.0.16/build/make.log says :

DKMS make.log for virtualbox-7.0.16 for kernel 6.17.0-14-generic (x86_64)
sam. 14 févr. 2026 11:20:00 CET
make : on entre dans le répertoire « /usr/src/linux-headers-6.17.0-14-generic »
make[1] : on entre dans le répertoire « /var/lib/dkms/virtualbox/7.0.16/build »
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
CC [M] vboxdrv/linux/SUPDrv-linux.o
CC [M] vboxdrv/SUPDrv.o
CC [M] vboxdrv/SUPDrvGip.o
CC [M] vboxdrv/SUPDrvSem.o
CC [M] vboxdrv/SUPDrvTracer.o
CC [M] vboxdrv/SUPLibAll.o
CC [M] vboxdrv/common/string/strformatrt.o
CC [M] vboxdrv/combined-agnostic1.o
CC [M] vboxdrv/combined-agnostic2.o
CC [M] vboxdrv/combined-os-specific.o
In file included from vboxdrv/linux/SUPDrv-linux.c:42:
vboxdrv/linux/../SUPDrvInternal.h:47:10: fatal error: VBox/cdefs.h: Aucun fichier ou dossier de ce nom
47 | #include <VBox/cdefs.h>
| ^~~~~~~~~~~~~~
compilation terminated.

BTW the include file is here :

aegir@aegir-system:~/Downloads$ ll /usr/src/virtualbox-7.0.16/include/VBox/cdefs.h
16 -rw-r--r-- 1 root root 14053 avril 16 2024 /usr/src/virtualbox-7.0.16/include/VBox/cdefs.h

You probably need to upgrade away from Ubuntu’s Vbox packages, at least for the moment. Or boot to a 6.14 kernel if you have one and see if the module will build there and not fail over the 6.17 again.

There are a few bug reports, like this.

many to most people get Virtualbox directly from Oracle, so it stays updated and (usually) supports kernel upgrades well.

Post #8 in the bug report has the correct instructions to do this.

Yes, I finally installed VB 7.2.6 from Oracle repositories ( deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian noble contrib ) and it works now.

Thanks.