Nvidia 460 驱动程序安装问题

Nvidia 460 驱动程序安装问题

我在使用 5.10 内核的 (K)Ubuntu 20.04 上安装 Nvidia 460 驱动程序时遇到问题。我尝试从 apt 存储库安装 nvidia-460 软件包,以及直接从 460.39 安装程序安装 nvidia-460 软件包(带或不带 dkms),但均未成功。

apt 安装 nvidia-driver-460:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libnvidia-cfg1-460 libnvidia-common-460 libnvidia-decode-460 libnvidia-decode-460:i386 libnvidia-encode-460 libnvidia-encode-460:i386
  libnvidia-extra-460 libnvidia-fbc1-460 libnvidia-fbc1-460:i386 libnvidia-gl-460 libnvidia-gl-460:i386 libnvidia-ifr1-460
  libnvidia-ifr1-460:i386 nvidia-compute-utils-460 nvidia-dkms-460 nvidia-kernel-common-460 nvidia-kernel-source-460 nvidia-utils-460
  xserver-xorg-video-nvidia-460
The following NEW packages will be installed:
  libnvidia-cfg1-460 libnvidia-common-460 libnvidia-decode-460 libnvidia-decode-460:i386 libnvidia-encode-460 libnvidia-encode-460:i386
  libnvidia-extra-460 libnvidia-fbc1-460 libnvidia-fbc1-460:i386 libnvidia-gl-460 libnvidia-gl-460:i386 libnvidia-ifr1-460
  libnvidia-ifr1-460:i386 nvidia-compute-utils-460 nvidia-dkms-460 nvidia-driver-460 nvidia-kernel-common-460 nvidia-kernel-source-460
  nvidia-utils-460 xserver-xorg-video-nvidia-460
0 upgraded, 20 newly installed, 0 to remove and 2 not upgraded.
Need to get 0 B/130 MB of archives.
After this operation, 424 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package libnvidia-cfg1-460:amd64.
(Reading database ... 547244 files and directories currently installed.)
Preparing to unpack .../00-libnvidia-cfg1-460_460.32.03-0ubuntu0.20.04.1_amd64.deb ...
Unpacking libnvidia-cfg1-460:amd64 (460.32.03-0ubuntu0.20.04.1) ...
Selecting previously unselected package libnvidia-common-460.
Preparing to unpack .../01-libnvidia-common-460_460.32.03-0ubuntu0.20.04.1_all.deb ...
Unpacking libnvidia-common-460 (460.32.03-0ubuntu0.20.04.1) ...
Selecting previously unselected package libnvidia-decode-460:i386.
Preparing to unpack .../02-libnvidia-decode-460_460.32.03-0ubuntu0.20.04.1_i386.deb ...
Unpacking libnvidia-decode-460:i386 (460.32.03-0ubuntu0.20.04.1) ...
Selecting previously unselected package libnvidia-decode-460:amd64.
Preparing to unpack .../03-libnvidia-decode-460_460.32.03-0ubuntu0.20.04.1_amd64.deb ...
Unpacking libnvidia-decode-460:amd64 (460.32.03-0ubuntu0.20.04.1) ...
Selecting previously unselected package libnvidia-encode-460:i386.
Preparing to unpack .../04-libnvidia-encode-460_460.32.03-0ubuntu0.20.04.1_i386.deb ...
Unpacking libnvidia-encode-460:i386 (460.32.03-0ubuntu0.20.04.1) ...
Selecting previously unselected package libnvidia-encode-460:amd64.
Preparing to unpack .../05-libnvidia-encode-460_460.32.03-0ubuntu0.20.04.1_amd64.deb ...
Unpacking libnvidia-encode-460:amd64 (460.32.03-0ubuntu0.20.04.1) ...
Selecting previously unselected package libnvidia-extra-460:amd64.
Preparing to unpack .../06-libnvidia-extra-460_460.32.03-0ubuntu0.20.04.1_amd64.deb ...
Unpacking libnvidia-extra-460:amd64 (460.32.03-0ubuntu0.20.04.1) ...
Selecting previously unselected package libnvidia-fbc1-460:amd64.
Preparing to unpack .../07-libnvidia-fbc1-460_460.32.03-0ubuntu0.20.04.1_amd64.deb ...
Unpacking libnvidia-fbc1-460:amd64 (460.32.03-0ubuntu0.20.04.1) ...
Selecting previously unselected package libnvidia-fbc1-460:i386.
Preparing to unpack .../08-libnvidia-fbc1-460_460.32.03-0ubuntu0.20.04.1_i386.deb ...
Unpacking libnvidia-fbc1-460:i386 (460.32.03-0ubuntu0.20.04.1) ...
Selecting previously unselected package libnvidia-gl-460:amd64.
Preparing to unpack .../09-libnvidia-gl-460_460.32.03-0ubuntu0.20.04.1_amd64.deb ...
Unpacking libnvidia-gl-460:amd64 (460.32.03-0ubuntu0.20.04.1) ...
Selecting previously unselected package libnvidia-gl-460:i386.
Preparing to unpack .../10-libnvidia-gl-460_460.32.03-0ubuntu0.20.04.1_i386.deb ...
Unpacking libnvidia-gl-460:i386 (460.32.03-0ubuntu0.20.04.1) ...
Selecting previously unselected package libnvidia-ifr1-460:amd64.
Preparing to unpack .../11-libnvidia-ifr1-460_460.32.03-0ubuntu0.20.04.1_amd64.deb ...
Unpacking libnvidia-ifr1-460:amd64 (460.32.03-0ubuntu0.20.04.1) ...
Selecting previously unselected package libnvidia-ifr1-460:i386.
Preparing to unpack .../12-libnvidia-ifr1-460_460.32.03-0ubuntu0.20.04.1_i386.deb ...
Unpacking libnvidia-ifr1-460:i386 (460.32.03-0ubuntu0.20.04.1) ...
Selecting previously unselected package nvidia-compute-utils-460.
Preparing to unpack .../13-nvidia-compute-utils-460_460.32.03-0ubuntu0.20.04.1_amd64.deb ...
Unpacking nvidia-compute-utils-460 (460.32.03-0ubuntu0.20.04.1) ...
Selecting previously unselected package nvidia-kernel-source-460.
Preparing to unpack .../14-nvidia-kernel-source-460_460.32.03-0ubuntu0.20.04.1_amd64.deb ...
Unpacking nvidia-kernel-source-460 (460.32.03-0ubuntu0.20.04.1) ...
Selecting previously unselected package nvidia-kernel-common-460.
Preparing to unpack .../15-nvidia-kernel-common-460_460.32.03-0ubuntu0.20.04.1_amd64.deb ...
Unpacking nvidia-kernel-common-460 (460.32.03-0ubuntu0.20.04.1) ...
Selecting previously unselected package nvidia-dkms-460.
Preparing to unpack .../16-nvidia-dkms-460_460.32.03-0ubuntu0.20.04.1_amd64.deb ...

WARNING: Your driver installation has been altered since it was initially installed; this may happen, for example, if you have since
         installed the NVIDIA driver through a mechanism other than nvidia-installer (such as your distribution's native package
         management system).  nvidia-installer will attempt to uninstall as best it can.  Please see the file
         '/var/log/nvidia-uninstall.log' for details.

Unpacking nvidia-dkms-460 (460.32.03-0ubuntu0.20.04.1) ...
Selecting previously unselected package nvidia-utils-460.
Preparing to unpack .../17-nvidia-utils-460_460.32.03-0ubuntu0.20.04.1_amd64.deb ...
Unpacking nvidia-utils-460 (460.32.03-0ubuntu0.20.04.1) ...
Selecting previously unselected package xserver-xorg-video-nvidia-460.
Preparing to unpack .../18-xserver-xorg-video-nvidia-460_460.32.03-0ubuntu0.20.04.1_amd64.deb ...
Unpacking xserver-xorg-video-nvidia-460 (460.32.03-0ubuntu0.20.04.1) ...
Selecting previously unselected package nvidia-driver-460.
Preparing to unpack .../19-nvidia-driver-460_460.32.03-0ubuntu0.20.04.1_amd64.deb ...
Unpacking nvidia-driver-460 (460.32.03-0ubuntu0.20.04.1) ...
Setting up libnvidia-common-460 (460.32.03-0ubuntu0.20.04.1) ...
Setting up libnvidia-fbc1-460:amd64 (460.32.03-0ubuntu0.20.04.1) ...
Setting up libnvidia-fbc1-460:i386 (460.32.03-0ubuntu0.20.04.1) ...
Setting up nvidia-compute-utils-460 (460.32.03-0ubuntu0.20.04.1) ...
Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
Adding system user `nvidia-persistenced' (UID 124) ...
Adding new group `nvidia-persistenced' (GID 130) ...
Adding new user `nvidia-persistenced' (UID 124) with group `nvidia-persistenced' ...
Not creating home directory `/nonexistent'.
Setting up nvidia-kernel-common-460 (460.32.03-0ubuntu0.20.04.1) ...
update-initramfs: deferring update (trigger activated)
Setting up libnvidia-cfg1-460:amd64 (460.32.03-0ubuntu0.20.04.1) ...
Setting up xserver-xorg-video-nvidia-460 (460.32.03-0ubuntu0.20.04.1) ...
Setting up nvidia-kernel-source-460 (460.32.03-0ubuntu0.20.04.1) ...
Setting up libnvidia-gl-460:amd64 (460.32.03-0ubuntu0.20.04.1) ...
Setting up libnvidia-gl-460:i386 (460.32.03-0ubuntu0.20.04.1) ...
Setting up libnvidia-extra-460:amd64 (460.32.03-0ubuntu0.20.04.1) ...
Setting up nvidia-utils-460 (460.32.03-0ubuntu0.20.04.1) ...
Setting up libnvidia-decode-460:amd64 (460.32.03-0ubuntu0.20.04.1) ...
Setting up libnvidia-decode-460:i386 (460.32.03-0ubuntu0.20.04.1) ...
Setting up libnvidia-ifr1-460:amd64 (460.32.03-0ubuntu0.20.04.1) ...
Setting up libnvidia-ifr1-460:i386 (460.32.03-0ubuntu0.20.04.1) ...
Setting up nvidia-dkms-460 (460.32.03-0ubuntu0.20.04.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/dell_latitude
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
Loading new nvidia-460.32.03 DKMS files...
Building for 5.10.16-051016-lowlatency
Building for architecture x86_64
Building initial module for 5.10.16-051016-lowlatency
ERROR (dkms apport): kernel package linux-headers-5.10.16-051016-lowlatency is not supported
Error! Bad return status for module build on kernel: 5.10.16-051016-lowlatency (x86_64)
Consult /var/lib/dkms/nvidia/460.32.03/build/make.log for more information.
dpkg: error processing package nvidia-dkms-460 (--configure):
 installed nvidia-dkms-460 package post-installation script subprocess returned error exit status 10
Setting up libnvidia-encode-460:amd64 (460.32.03-0ubuntu0.20.04.1) ...
Setting up libnvidia-encode-460:i386 (460.32.03-0ubuntu0.20.04.1) ...
dpkg: dependency problems prevent configuration of nvidia-driver-460:
 nvidia-driver-460 depends on nvidia-dkms-460 (<= 460.32.03-1); however:
  Package nvidia-dkms-460 is not configured yet.
 nvidia-driver-460 depends on nvidia-dkms-460 (>= 460.32.03); however:
  Package nvidia-dkms-460 is not configured yet.

dpkg: error processing package nvidia-driver-460 (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for initramfs-tools (0.136ubuntu6.3) ...
update-initramfs: Generating /boot/initrd.img-5.10.16-051016-lowlatency
W: Possible missing firmware /lib/firmware/i915/tgl_huc_7.5.0.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_huc_7.5.0.bin for module i915
Errors were encountered while processing:
 nvidia-dkms-460
 nvidia-driver-460
E: Sub-process /usr/bin/dpkg returned an error code (1)

缩短的 nvidia_installer.log(不含 dkms):

nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Sat Feb 13 20:52:18 2021
installer version: 460.39

PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin

nvidia-installer command line:
    ./nvidia-installer

Using: nvidia-installer ncurses v6 user interface
-> Detected 4 CPUs online; setting concurrency level to 4.
-> Installing NVIDIA driver version 460.39.
-> There appears to already be a driver installed on your system (version: 460.39).  As part of installing this driver (version: 460.39), the existing driver will be uninstalled.  Are you sure you want to continue? (Answer: Continue installation)
-> The NVIDIA driver appears to have been installed previously using a different installer. To prevent potential conflicts, it is recommended either to update the existing installation using the same mechanism by which it was originally installed, or to uninstall the existing installation before installing this driver.

Please review the message provided by the maintainer of this alternate installation method and decide how to proceed:

The package that is already installed is named nvidia-460-460.

You can upgrade the driver by running:
`apt-get install nvidia-460-460`

You can remove nvidia-460-460, and all related packages, by running:
`apt-get remove --purge nvidia-460`
`apt-get autoremove`

This package is maintained by NVIDIA ([email protected]).


(Answer: Continue installation)
-> Would you like to register the kernel module sources with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later. (Answer: No)
-> Performing CC sanity check with CC="/usr/bin/cc".
-> Performing CC check.
-> Kernel source path: '/lib/modules/5.10.16-051016-lowlatency/build'
-> Kernel output path: '/lib/modules/5.10.16-051016-lowlatency/build'
-> Performing Compiler check.
-> Performing Dom0 check.
-> Performing Xen check.
-> Performing PREEMPT_RT check.
-> Performing vgpu_kvm check.
-> Cleaning kernel module build directory.
   executing: 'cd ./kernel; /usr/bin/make -k -j4 clean NV_EXCLUDE_KERNEL_MODULES="" SYSSRC="/lib/modules/5.10.16-051016-lowlatency/build" SYSOUT="/lib/modules/5.10.16-051016-lowlatency/build"'...
   rm -f -r conftest
   make[1]: Entering directory '/usr/src/linux-headers-5.10.16-051016-lowlatency'
   make[1]: Leaving directory '/usr/src/linux-headers-5.10.16-051016-lowlatency'
-> Building kernel modules
   executing: 'cd ./kernel; /usr/bin/make -k -j4  NV_EXCLUDE_KERNEL_MODULES="" SYSSRC="/lib/modules/5.10.16-051016-lowlatency/build" SYSOUT="/lib/modules/5.10.16-051016-lowlatency/build"'...
   make[1]: Entering directory '/usr/src/linux-headers-5.10.16-051016-lowlatency'
   scripts/Makefile.lib:8: 'always' is deprecated. Please use 'always-y' instead
     SYMLINK /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-kernel.o
     SYMLINK /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia-modeset/nv-modeset-kernel.o
    CONFTEST: hash__remap_4k_pfn
    ...
    CONFTEST: drm_alpha_blending_available
     CC [M]  /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-frontend.o
     ...
     CC [M]  /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia-drm/nvidia-drm-format.o
     LD [M]  /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia.o
     LD [M]  /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia-uvm.o
     LD [M]  /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia-modeset.o
   ld -r -o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-interface.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-frontend.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-pci.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-acp
   i.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-cray.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-dma.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-i2c.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-mmap.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-p2p.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-pat.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-procfs.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-usermap.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-vm.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-vtophys.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/os-interface.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/os-mlock.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/os-pci.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/os-registry.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.3
   9/kernel/nvidia/os-usermap.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-modeset-interface.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-pci-table.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-kthread-q.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-memdbg.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-ibmnpu.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-report-err.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-rsync.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-msi.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-caps.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv_uvm_interface.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nvlink_linux.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nvlink_caps.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/linux_nvswitch.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-46
   0.39/kernel/nvidia/procfs_nvswitch.o
   ld -r -o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia-modeset/nv-modeset-interface.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia-modeset/nvidia-modeset-linux.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia-modeset/nv-kthread-q.o
     LD [M]  /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia-drm.o
     MODPOST /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/Module.symvers
   make[3]: *** No rule to make target 'scripts/module.lds', needed by '/tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia-drm.ko'.
     CC [M]  /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia-drm.mod.o
     CC [M]  /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia-modeset.mod.o
     CC [M]  /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia-uvm.mod.o
     CC [M]  /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia.mod.o
   make[3]: Target '__modfinal' not remade because of errors.
   make[2]: *** [scripts/Makefile.modpost:117: __modpost] Error 2
   make[1]: *** [Makefile:1711: modules] Error 2
   make[1]: Leaving directory '/usr/src/linux-headers-5.10.16-051016-lowlatency'
   make: *** [Makefile:80: modules] Error 2
-> Error.
ERROR: An error occurred while performing the step: "Building kernel modules". See /var/log/nvidia-installer.log for details.
-> The command `cd ./kernel; /usr/bin/make -k -j4  NV_EXCLUDE_KERNEL_MODULES="" SYSSRC="/lib/modules/5.10.16-051016-lowlatency/build" SYSOUT="/lib/modules/5.10.16-051016-lowlatency/build"` failed with the following output:

make[1]: Entering directory '/usr/src/linux-headers-5.10.16-051016-lowlatency'
scripts/Makefile.lib:8: 'always' is deprecated. Please use 'always-y' instead
  SYMLINK /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-kernel.o
  SYMLINK /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia-modeset/nv-modeset-kernel.o
 CONFTEST: hash__remap_4k_pfn
 ...
 CONFTEST: drm_alpha_blending_available
  CC [M]  /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-frontend.o
  ...
  CC [M]  /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia-drm/nvidia-drm-format.o
  LD [M]  /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia.o
  LD [M]  /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia-uvm.o
  LD [M]  /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia-modeset.o
ld -r -o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-interface.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-frontend.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-pci.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-acpi.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-cray.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-dma.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-i2c.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-mmap.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-p2p.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-pat.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-procfs.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-usermap.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-vm.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-vtophys.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/os-interface.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/os-mlock.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/os-pci.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/os-registry.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/os-usermap.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-modeset-interface.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-pci-table.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-kthread-q.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-memdbg.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-ibmnpu.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-report-err.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-rsync.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-msi.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv-caps.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nv_uvm_interface.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nvlink_linux.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/nvlink_caps.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/linux_nvswitch.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia/procfs_nvswitch.o
ld -r -o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia-modeset/nv-modeset-interface.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia-modeset/nvidia-modeset-linux.o /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia-modeset/nv-kthread-q.o
  LD [M]  /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia-drm.o
  MODPOST /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/Module.symvers
make[3]: *** No rule to make target 'scripts/module.lds', needed by '/tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia-drm.ko'.
  CC [M]  /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia-drm.mod.o
  CC [M]  /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia-modeset.mod.o
  CC [M]  /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia-uvm.mod.o
  CC [M]  /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia.mod.o
make[3]: Target '__modfinal' not remade because of errors.
make[2]: *** [scripts/Makefile.modpost:117: __modpost] Error 2
make[1]: *** [Makefile:1711: modules] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.10.16-051016-lowlatency'
make: *** [Makefile:80: modules] Error 2
-> Checking to see whether the nvidia kernel module was successfully built
   executing: 'cd ./kernel; /usr/bin/make -k -j4 NV_KERNEL_MODULES="nvidia" NV_EXCLUDE_KERNEL_MODULES="" SYSSRC="/lib/modules/5.10.16-051016-lowlatency/build" SYSOUT="/lib/modules/5.10.16-051016-lowlatency/build"'...
   make[1]: Entering directory '/usr/src/linux-headers-5.10.16-051016-lowlatency'
   scripts/Makefile.lib:8: 'always' is deprecated. Please use 'always-y' instead
     MODPOST /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/Module.symvers
   make[3]: *** No rule to make target 'scripts/module.lds', needed by '/tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia.ko'.
   make[3]: Target '__modfinal' not remade because of errors.
   make[2]: *** [scripts/Makefile.modpost:117: __modpost] Error 2
   make[1]: *** [Makefile:1711: modules] Error 2
   make[1]: Leaving directory '/usr/src/linux-headers-5.10.16-051016-lowlatency'
   make: *** [Makefile:80: modules] Error 2
-> Error.
ERROR: An error occurred while performing the step: "Checking to see whether the nvidia kernel module was successfully built". See /var/log/nvidia-installer.log for details.
-> The command `cd ./kernel; /usr/bin/make -k -j4 NV_KERNEL_MODULES="nvidia" NV_EXCLUDE_KERNEL_MODULES="" SYSSRC="/lib/modules/5.10.16-051016-lowlatency/build" SYSOUT="/lib/modules/5.10.16-051016-lowlatency/build"` failed with the following output:

make[1]: Entering directory '/usr/src/linux-headers-5.10.16-051016-lowlatency'
scripts/Makefile.lib:8: 'always' is deprecated. Please use 'always-y' instead
  MODPOST /tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/Module.symvers
make[3]: *** No rule to make target 'scripts/module.lds', needed by '/tmp/selfgz114595/NVIDIA-Linux-x86_64-460.39/kernel/nvidia.ko'.
make[3]: Target '__modfinal' not remade because of errors.
make[2]: *** [scripts/Makefile.modpost:117: __modpost] Error 2
make[1]: *** [Makefile:1711: modules] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.10.16-051016-lowlatency'
make: *** [Makefile:80: modules] Error 2
ERROR: The nvidia kernel module was not created.
ERROR: Installation has failed.  Please see the file '/var/log/nvidia-installer.log' for details.  You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.

答案1

这就是线

没有规则来制定目标‘scripts/module.lds’

我找到了解决方案本期第 13 条评论其中写道:

以下是我用来修复此问题的解决方案。转到/usr/src/linux-headers-[KERNEL-VERSION]-generic/scripts并复制module.lsb.S,删除包含行,然后另存为,module.lsb然后再次运行dkms。这些文件将根据内核版本而更改,因此您必须自行执行。

也可以找到类似问题的参考这里

相关内容