几天来,我一直在尝试为我的 GeForce RTX 3050 安装驱动程序。我需要这台笔记本电脑来进行机器学习,而不是玩游戏,因此我需要 CUDA 支持。
但是,nvidia-driver-495 或 nvidia-driver-470 的安装总是失败。在我看来,这个失败似乎是由 nvidia-dkms-495 或 nvidia-dkms-470 的失败引起的。
我使用的是 Ubuntu 21.10,内核是 5.13.0-20-generic。我看到一些帖子说缺少固件不是问题,但如果需要解决这个问题,我不确定该怎么做。
下面您将看到失败的(重新)安装的跟踪:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
nvidia-driver-495 is already the newest version (495.44-0ubuntu0.21.10.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up nvidia-dkms-495 (495.44-0ubuntu0.21.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/dell_latitude
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
Removing old nvidia-495.44 DKMS files...
------------------------------
Deleting module version: 495.44
completely from the DKMS tree.
------------------------------
Done.
Loading new nvidia-495.44 DKMS files...
Building for 5.13.0-20-generic
Building for architecture x86_64
Building initial module for 5.13.0-20-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/nvidia-kernel-source-495.0.crash'
Error! Bad return status for module build on kernel: 5.13.0-20-generic (x86_64)
Consult /var/lib/dkms/nvidia/495.44/build/make.log for more information.
dpkg: error processing package nvidia-dkms-495 (--configure):
installed nvidia-dkms-495 package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of nvidia-driver-495:
nvidia-driver-495 depends on nvidia-dkms-495 (<= 495.44-1); however:
Package nvidia-dkms-495 is not configured yet.
nvidia-driver-495 depends on nvidia-dkms-495 (>= 495.44); however:
Package nvidia-dkms-495 is not configured yet.
dpkg: error processing package nvidia-driver-495 (--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 initramfs-tools (0.140ubuntu6) ...
update-initramfs: Generating /boot/initrd.img-5.13.0-20-generic
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_gpu_info.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/aldebaran_ta.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/aldebaran_sos.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/aldebaran_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/aldebaran_mec2.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/aldebaran_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/aldebaran_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/aldebaran_vcn.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/aldebaran_smc.bin for module amdgpu
Errors were encountered while processing:
nvidia-dkms-495
nvidia-driver-495
E: Sub-process /usr/bin/dpkg returned an error code (1)
我似乎无法弄清楚真正的错误是什么。
答案1
删除 /var/crash/nvidia-kernel-source-495*.crash
(重新)安装linux-firmware
打开Software & Updates
附加驱动程序选项卡,选择 nouveau 驱动程序。然后重新启动。
清除所有 Nvidia 软件。
dpkg -l *nvidia*
应全部显示为un
已卸载。
dkms status
不应显示 nvidia 内核模块。
打开Software & Updates
附加驱动程序选项卡,选择 Nvidia 495 驱动程序。然后重新启动。
答案2
gcc-9.3
我已经通过安装然后重试从软件 ubuntu 应用程序安装解决了这个问题