It seems like parallels or ubuntu f'ed it up by changing the gcc version. I was unable to install the tools and got the following error:
Started installation of Parallels Guest Tools version '19.2.1.54832'
modprobe: FATAL: Module prl_tg not found in directory /lib/modules/6.5.0-21-generic
sudo /media/username/Parallels Tools/installer/install-cli.sh
Mo 26 Feb 2024 14:32:41 CET
Start installation or upgrade of Guest Tools
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: cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
cc: error: unrecognized command-line option '-ftrivial-auto-var-init=zero'
make[4]: *** [scripts/Makefile.build:251: /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.o] Error 1
make[3]: *** [/usr/src/linux-headers-6.5.0-21-generic/Makefile:2039: /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg] Error 2
make[2]: *** [Makefile:234: __sub-make] Error 2
make[1]: *** [Makefile:44: prl_tg] Error 2
make: *** [Makefile.kmods:54: compile] Error 2
Error: could not build kernel modules
modprobe: FATAL: Module prl_tg not found in directory /lib/modules/6.5.0-21-generic
modprobe: FATAL: Module prl_tg not found in directory /lib/modules/6.5.0-21-generic
Error: failed to install Parallels Guest Tools!
To fix the issue:
sudo apt install --reinstall gcc-12
sudo ln -s -f /usr/bin/gcc-12 /usr/bin/gcc
Started installation of Parallels Guest Tools version '19.2.1.54832'
modprobe: FATAL: Module prl_tg not found in directory /lib/modules/6.5.0-21-generic
sudo /media/username/Parallels Tools/installer/install-cli.sh
Mo 26 Feb 2024 14:32:41 CET
Start installation or upgrade of Guest Tools
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: cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
cc: error: unrecognized command-line option '-ftrivial-auto-var-init=zero'
make[4]: *** [scripts/Makefile.build:251: /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.o] Error 1
make[3]: *** [/usr/src/linux-headers-6.5.0-21-generic/Makefile:2039: /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg] Error 2
make[2]: *** [Makefile:234: __sub-make] Error 2
make[1]: *** [Makefile:44: prl_tg] Error 2
make: *** [Makefile.kmods:54: compile] Error 2
Error: could not build kernel modules
modprobe: FATAL: Module prl_tg not found in directory /lib/modules/6.5.0-21-generic
modprobe: FATAL: Module prl_tg not found in directory /lib/modules/6.5.0-21-generic
Error: failed to install Parallels Guest Tools!
To fix the issue:
sudo apt install --reinstall gcc-12
sudo ln -s -f /usr/bin/gcc-12 /usr/bin/gcc