I attempted to update this Ubuntu 22.04 system to latest, as I do every couple of months. I executed the command: apt update && apt upgrade -y
The log shows:
Setting up virtualbox-dkms (6.1.32-dfsg-1build1) ...
Removing old virtualbox-6.1.32 DKMS files...
Deleting module virtualbox-6.1.32 completely from the DKMS tree.
Loading new virtualbox-6.1.32 DKMS files...
Building for 6.5.0-44-generic
Building initial module for 6.5.0-44-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.5.0-44-generic (x86_64)
Consult /var/lib/dkms/virtualbox/6.1.32/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
dpkg: dependency problems prevent configuration of virtualbox:
virtualbox depends on virtualbox-dkms (>= 6.1.32-dfsg-1build1) | virtualbox-source (>= 6.1.32-dfsg-1build1) | virtualbox-modules; however:
Package virtualbox-dkms is not configured yet.
Package virtualbox-source is not installed.
Package virtualbox-modules is not installed.
Package virtualbox-dkms which provides virtualbox-modules is not configured yet.
dpkg: error processing package virtualbox (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of virtualbox-qt:
virtualbox-qt depends on virtualbox (= 6.1.32-dfsg-1build1); however:
Package virtualbox is not configured yet.
dpkg: error processing package virtualbox-qt (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
virtualbox-dkms
virtualbox
virtualbox-qt
E: Sub-process /usr/bin/dpkg returned an error code (1)
The file /var/lib/dkms/virtualbox/6.1.32/build/make.log as indicated above, contains:
DKMS make.log for virtualbox-6.1.32 for kernel 6.5.0-44-generic (x86_64)
Sat Aug 29 10:25:09 PM EDT 2026
make: Entering directory '/usr/src/linux-headers-6.5.0-44-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
You are using:
^[[1mdpkg-architecture: ^[[0m^[[1;33mwarning^[[0m: cannot determine CC system type, falling back to default (native compilation)
CC [M] /var/lib/dkms/virtualbox/6.1.32/build/vboxdrv/linux/SUPDrv-linux.o
/bin/sh: 1: gcc-12: not found
make[3]: *** [scripts/Makefile.build:251: /var/lib/dkms/virtualbox/6.1.32/build/vboxdrv/linux/SUPDrv-linux.o] Error 127
make[2]: *** [scripts/Makefile.build:488: /var/lib/dkms/virtualbox/6.1.32/build/vboxdrv] Error 2
make[1]: *** [/usr/src/linux-headers-6.5.0-44-generic/Makefile:2039: /var/lib/dkms/virtualbox/6.1.32/build] Error 2
make: *** [Makefile:234: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-headers-6.5.0-44-generic'
I have found several articles that talk about resolution for something similar (not quite the same), and each of them (such as this one) advises to run /sbin/virtualboxconfig as root. However, there is no such file on the system.
Installation and removal of any software on the system now fails, as it tries each time to resolve this apprently insoluable problem.
Please advise. I don’t need virtualbox anymore (never uaed it, TBH) if that helps.