Nvidia-dkms-460 Error

Ok. So I just need to change the gcc and g++ compiler versions?
update-alternatives --set cc gcc-9
update-alternatives --set c++ g+±9
In the above commands shall I install these versions and then provide their absolute paths right?

Actually the answers are already in this thread…
However:
cat /proc/version
will show you the compiler version the kernel was built with.
Most likely this version is already installed on your system.
Follow my instructions in this thread to verify your systems state and then set the correct compiler version:

when I run command: update-alternatives --set cc gcc-9
update-alternatives: error: alternative path is not absolute as it should be: gcc-9

and when I run command providing absolute path: update-alternatives --set cc /usr/bin/gcc-9
I get the following error message:
update-alternatives: error: alternative /usr/bin/gcc-9 for cc not registered; not setting

man update-alternatives

After changing the gcc and g++ verison, i’m still getting the same error while updating packages.

Here’s the error log:
Setting up nvidia-dkms-460 (460.73.01-0ubuntu1) …
update-initramfs: deferring update (trigger activated)

A modprobe blacklist file has been created at /etc/modprobe.d to prevent Nouveau
from loading. This can be reverted by deleting the following file:
/etc/modprobe.d/nvidia-graphics-drivers.conf

A new initrd image has also been created. To revert, please regenerate your
initrd by running the following command after deleting the modprobe.d file:
/usr/sbin/initramfs -u


*** Reboot your computer and verify that the NVIDIA graphics driver can ***
*** be loaded. ***


INFO:Enable nvidia
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
Removing old nvidia-460.73.01 DKMS files…


Deleting module version: 460.73.01
completely from the DKMS tree.

Done.
Loading new nvidia-460.73.01 DKMS files…
Building for 5.11.0-7614-generic
Building for architecture x86_64
Building initial module for 5.11.0-7614-generic
ERROR (dkms apport): kernel package linux-headers-5.11.0-7614-generic is not supported
Error! Application of patch disable_fstack-clash-protection_fcf-protection.patch failed.
Check /var/lib/dkms/nvidia/460.73.01/build/ for more information.
dpkg: error processing package nvidia-dkms-460 (–configure):
installed nvidia-dkms-460 package post-installation script subprocess returned error exit status 6
Processing triggers for initramfs-tools (0.137ubuntu12) …
update-initramfs: Generating /boot/initrd.img-5.11.0-7614-generic
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_gpu_info.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_gpu_info.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/dimgrey_cavefish_ta.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/dimgrey_cavefish_sos.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_toc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_asd.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_ta.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_asd.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_sos.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_mec2.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/dimgrey_cavefish_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/dimgrey_cavefish_mec2.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/dimgrey_cavefish_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/dimgrey_cavefish_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/dimgrey_cavefish_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/dimgrey_cavefish_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_mec2.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/dimgrey_cavefish_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/sienna_cichlid_mes.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/navi10_mes.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/dimgrey_cavefish_vcn.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_vcn.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_vcn.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/dimgrey_cavefish_smc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_smc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/dimgrey_cavefish_dmcub.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_dmcub.bin for module amdgpu
kernelstub.Config : INFO Looking for configuration…
kernelstub : INFO System information:

OS:..................Pop!_OS 20.10
Root partition:....../dev/sda3
Root FS UUID:........56469e35-7b80-49c9-bbde-6bca52eb7f05
ESP Path:............/boot/efi
ESP Partition:......./dev/sda2
ESP Partition #:.....2
NVRAM entry #:.......-1
Boot Variable #:.....0000
Kernel Boot Options:.quiet loglevel=0 systemd.show_status=false splash
Kernel Image Path:.../boot/vmlinuz-5.11.0-7614-generic
Initrd Image Path:.../boot/initrd.img-5.11.0-7614-generic
Force-overwrite:.....False

kernelstub.Installer : INFO Copying Kernel into ESP
kernelstub.Installer : INFO Copying initrd.img into ESP
kernelstub.Installer : INFO Setting up loader.conf configuration
kernelstub.Installer : INFO Making entry file for Pop!_OS
kernelstub.Installer : INFO Backing up old kernel
kernelstub.Installer : INFO Making entry file for Pop!_OS
Errors were encountered while processing:
nvidia-dkms-460
E: Sub-process /usr/bin/dpkg returned an error code (1) exit:100
base)

Please run nvidia-bug-report.sh as root and attach the resulting file here.

Hi,

I have the exact same problem as @eternal_observer.

Please find attached my bug-report file.

Thanksnvidia-bug-report.log.gz (373.9 KB)

nvidia-bug-report.log.gz (122.3 KB) Here’s the bug report.

which Linux distro and kernel are you using?

Linux version 5.11.0-7614-generic (buildd@lgw01-amd64-025) (gcc (Ubuntu 10.2.0-13ubuntu1) 10.2.0, GNU ld (GNU Binutils for Ubuntu) 2.35.1) #15~1618626693~20.10~ecb25cd-Ubuntu SMP Thu Apr 22 16:00:45 UTC

pop!_os 20.10

Configurando nvidia-dkms-460 (460.73.01-0ubuntu0.20.10.1) ...
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
Removing old nvidia-460.73.01 DKMS files...

------------------------------
Deleting module version: 460.73.01
completely from the DKMS tree.
------------------------------
Done.
Loading new nvidia-460.73.01 DKMS files...
Building for 5.11.0-7614-generic
Building for architecture x86_64
Building initial module for 5.11.0-7614-generic
ERROR (dkms apport): kernel package linux-headers-5.11.0-7614-generic is not supported
Error! Application of patch disable_fstack-clash-protection_fcf-protection.patch failed.
Check /var/lib/dkms/nvidia/460.73.01/build/ for more information.
dpkg: erro ao processar o pacote nvidia-dkms-460 (--configure):
 o subprocesso instalado, do pacote nvidia-dkms-460, o script post-installation retornou erro do status de saída 6
A processar 'triggers' para initramfs-tools (0.137ubuntu12) ...
update-initramfs: Generating /boot/initrd.img-5.11.0-7614-generic
cryptsetup: WARNING: Resume target cryptswap uses a key file
kernelstub.Config    : INFO     Looking for configuration...
kernelstub           : INFO     System information: 

    OS:..................Pop!_OS 20.10
    Root partition:....../dev/nvme0n1p3
    Root FS UUID:........015ce176-42c3-4dd6-90b2-8596250e43e3
    ESP Path:............/boot/efi
    ESP Partition:......./dev/nvme0n1p1
    ESP Partition #:.....1
    NVRAM entry #:.......-1
    Boot Variable #:.....0000
    Kernel Boot Options:.quiet loglevel=0 systemd.show_status=false splash
    Kernel Image Path:.../boot/vmlinuz-5.11.0-7614-generic
    Initrd Image Path:.../boot/initrd.img-5.11.0-7614-generic
    Force-overwrite:.....False

kernelstub.Installer : INFO     Copying Kernel into ESP
kernelstub.Installer : INFO     Copying initrd.img into ESP
kernelstub.Installer : INFO     Setting up loader.conf configuration
kernelstub.Installer : INFO     Making entry file for Pop!_OS
kernelstub.Installer : INFO     Backing up old kernel
kernelstub.Installer : INFO     Making entry file for Pop!_OS
Erros foram encontrados durante o processamento de:
 nvidia-dkms-460
E: Sub-process /usr/bin/dpkg returned an error code (1)

From pop!_os store update process I’ve got the following message:

The following packages have unmet dependencies:
  nvidia-driver-460: Dependency: nvidia-kernel-source-460 (= 460.67-1pop0~1616430777~20.10~71e1ad1) but 460.73.01-0ubuntu0.20.10.1 is to be installed
                     Dependency: libnvidia-extra-460 (= 460.67-1pop0~1616430777~20.10~71e1ad1) but 460.73.01-0ubuntu0.20.10.1 is to be installed
                     Dependency: nvidia-compute-utils-460 (= 460.67-1pop0~1616430777~20.10~71e1ad1) but 460.73.01-0ubuntu0.20.10.1 is to be installed
                     Dependency: nvidia-utils-460 (= 460.67-1pop0~1616430777~20.10~71e1ad1) but 460.73.01-0ubuntu0.20.10.1 is to be installed
                     Dependency: xserver-xorg-video-nvidia-460 (= 460.67-1pop0~1616430777~20.10~71e1ad1) but 460.73.01-0ubuntu0.20.10.1 is to be installed
                     Dependency: libnvidia-cfg1-460 (= 460.67-1pop0~1616430777~20.10~71e1ad1) but 460.73.01-0ubuntu0.20.10.1 is to be installed

I had a similar issue and this suggested reinstall helped:

I am having the same error. I have attatched the bug report. please help
nvidia-bug-report.log (598.3 KB)

Thanks!

Following the suggestion worked.

Thanks for sharing.

Although, then I have to re-install my CUDA libraries again. sigh

Linux version 5.11.0-7614-generic (buildd@lgw01-amd64-025) (gcc (Ubuntu 10.2.0-13ubuntu1)

Kernel was built with gcc 10.

gcc version 9.3.0 (Ubuntu 9.3.0-18ubuntu1)

But you (now) have v. 9.
Guess you set that?
I told you to look at /proc/version.
Check if gcc and g++ v. 10 are installed. And if yes, use update-alternatives.
Purge and reinstall the driver using apt.
You just need to install cuda-toolkit, not complete cuda (which would try to install its own driver when following the nvidia guide).

It was originally set to v10. I saw you changing it to v9 in this thread so I did so. So maybe this isn’t an issue related to gcc as I had this problem before changing the version.

Well, set it back to default.
purge all driver and cuda files.
reinstall the driver from repo and then install cuda-toolkit.