Code: Select all
dpkg: error processing package nvidia-dkms-525(--configure):
installed nvidia-dkms-525 package post-installation script subprocess returned error exit status 10
Examining the /var/lib/dkms/nvidia/525.78.01/build/make.log reveals multiple
cc: error: unrecognized command-line option ‘-ftrivial-auto-var-init=zero’
[Per SMG - The Nvidia-525 driver needs the same version gcc as the kernel you have installed used. You upgraded to the 5.19 kernel. Had you remained on the 5.15 kernel then you would not have had problems.] Switching back to 5.15 is therefore an option.
-------------------------------------
If you don't want to switch back to kernel 5.15, here's what worked for me:
Remove nvidia driver
Code: Select all
sudo apt-get purge *nvidia* && sudo apt-get autoremove
# https://linuxconfig.org/how-to-switch-b ... ocal-fossa
Code: Select all
sudo apt-get install gcc-12
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12
Code: Select all
gcc --version
gcc (Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0
Copyright (C) 2022 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.
Code: Select all
sudo apt-get install nvidia-driver-525