Background:
I have a Win11Pro VMWare virtual machine for work that I open with VMware-Workstation-Full-17.6.2-24409262.x86_64.bundle, and need VMWare’s vmmon and vmnet modules to be signed.
Ubuntu Version:
25.10
Problem Description:
After upgrading to Ubuntu 25.10, this no longer works because there is a mismatch of the compilers. They look quite similar, but not identical:
Relevant System Information:
vox@vox-Legion-7-16ARHA7:~$ sudo vmware-modconfig --console --install-all
[sudo: authenticate] Password:
[AppLoader] Use shipped Linux kernel AIO access library.
An up-to-date "libaio" or "libaio1" package from your system is preferred.
[AppLoader] GLib does not have GSettings support.
Stopping VMware services:
VMware Authentication Daemon done
Virtual machine monitor done
make: Entering directory '/tmp/modconfig-bssP4h/vmmon-only'
Using kernel build system.
/usr/bin/make -C /lib/modules/6.17.0-7-generic/build/include/.. M=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/linux-headers-6.17.0-7-generic'
make[2]: Entering directory '/tmp/modconfig-bssP4h/vmmon-only'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc (Ubuntu 15.2.0-4ubuntu4) 15.2.0
You are using: gcc (Ubuntu 15.2.0-4ubuntu4) 15.2.0**
CC [M] linux/driver.o
CC [M] linux/driverLog.o
CC [M] linux/hostif.o
CC [M] common/apic.o
CC [M] common/comport.o
CC [M] common/cpuid.o
CC [M] common/crosspage.o
CC [M] common/memtrack.o
CC [M] common/moduleloop.o
CC [M] common/phystrack.o
CC [M] common/sharedAreaVmmon.o
common/apic.c:20:10: fatal error: vm_basic_defs.h: No such file or directory
20 | #include "vm_basic_defs.h"
| ^~~~~~~~~~~~~~~~~
**compilation terminated.**
(followed by lots of other, similar, fatal errors)
These are the commands I would usually execute to make everything work again:
openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=VMware/"
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vmmon)
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vmnet)
sudo mokutil --import MOK.der
<reboot, import key at boot prompt, reboot>
System info:
vox@vox-Legion-7-16ARHA7:~$ uname -a; gcc --version; apt-cache policy linux-image-generic; free -h; df -h /
Linux vox-Legion-7-16ARHA7 6.17.0-7-generic #7-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 18 10:10:29 UTC 2025 x86_64 GNU/Linux
gcc (Ubuntu 15.2.0-4ubuntu4) 15.2.0
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
linux-image-generic:
Installed: 6.17.0-7.7
Candidate: 6.17.0-7.7
Version table:
*** 6.17.0-7.7 500
500 http://archive.ubuntu.com/ubuntu questing-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu questing-security/main amd64 Packages
100 /var/lib/dpkg/status
6.17.0-5.5 500
500 http://archive.ubuntu.com/ubuntu questing/main amd64 Packages
total used free shared buff/cache available
Mem: 14Gi 3.6Gi 8.1Gi 86Mi 2.2Gi 10Gi
Swap: 4.0Gi 0B 4.0Gi
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p2 937G 366G 524G 42% /
Can I force using “x86_64-linux-gnu-gcc (Ubuntu 15.2.0-4ubuntu4) 15.2.0”, or is there a more elegant solution out there.
This question has similarities with “Unable to upgrade kernel, dpkg exiting with error on tp_sampi for Thinkpad” - but I don’t think [stochastic]'s solution would help me. Unable to upgrade kernel, dpkg exiting with error on tp_sampi for Thinkpad
Any help would be greatly appreciated,
Cheers, Vox
