我正在尝试通过以下命令安装推荐的 NVIDIA 驱动程序:
sudo apt-get install nvidia-driver-550
但我一直收到以下错误信息:
Get:1 file:/var/cuda-repo-ubuntu2204-12-4-local libnvidia-cfg1-550 550.54.15-0ubuntu1 [145 kB]
Err:1 file:/var/cuda-repo-ubuntu2204-12-4-local libnvidia-cfg1-550 550.54.15-0ubuntu1
File not found - /var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-cfg1-550_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
Get:2 file:/var/cuda-repo-ubuntu2204-12-4-local libnvidia-common-550 550.54.15-0ubuntu1 [17.1 kB]
Err:2 file:/var/cuda-repo-ubuntu2204-12-4-local libnvidia-common-550 550.54.15-0ubuntu1
File not found - /var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-common-550_550.54.15-0ubuntu1_all.deb (2: No such file or directory)
Get:3 file:/var/cuda-repo-ubuntu2204-12-4-local libnvidia-decode-550 550.54.15-0ubuntu1 [2,129 kB]
Err:3 file:/var/cuda-repo-ubuntu2204-12-4-local libnvidia-decode-550 550.54.15-0ubuntu1
File not found - /var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-decode-550_550.54.15-0ubuntu1_i386.deb (2: No such file or directory)
Get:4 file:/var/cuda-repo-ubuntu2204-12-4-local libnvidia-decode-550 550.54.15-0ubuntu1 [1,783 kB]
Err:4 file:/var/cuda-repo-ubuntu2204-12-4-local libnvidia-decode-550 550.54.15-0ubuntu1
File not found - /var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-decode-550_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
Get:5 file:/var/cuda-repo-ubuntu2204-12-4-local libnvidia-encode-550 550.54.15-0ubuntu1 [100 kB]
Err:5 file:/var/cuda-repo-ubuntu2204-12-4-local libnvidia-encode-550 550.54.15-0ubuntu1
File not found - /var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-encode-550_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
Get:6 file:/var/cuda-repo-ubuntu2204-12-4-local libnvidia-encode-550 550.54.15-0ubuntu1 [107 kB]
Err:6 file:/var/cuda-repo-ubuntu2204-12-4-local libnvidia-encode-550 550.54.15-0ubuntu1
File not found - /var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-encode-550_550.54.15-0ubuntu1_i386.deb (2: No such file or directory)
Get:7 file:/var/cuda-repo-ubuntu2204-12-4-local libnvidia-extra-550 550.54.15-0ubuntu1 [71.1 kB]
Err:7 file:/var/cuda-repo-ubuntu2204-12-4-local libnvidia-extra-550 550.54.15-0ubuntu1
File not found - /var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-extra-550_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
Get:8 file:/var/cuda-repo-ubuntu2204-12-4-local libnvidia-fbc1-550 550.54.15-0ubuntu1 [59.7 kB]
Err:8 file:/var/cuda-repo-ubuntu2204-12-4-local libnvidia-fbc1-550 550.54.15-0ubuntu1
File not found - /var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-fbc1-550_550.54.15-0ubuntu1_i386.deb (2: No such file or directory)
Get:9 file:/var/cuda-repo-ubuntu2204-12-4-local libnvidia-fbc1-550 550.54.15-0ubuntu1 [54.9 kB]
Err:9 file:/var/cuda-repo-ubuntu2204-12-4-local libnvidia-fbc1-550 550.54.15-0ubuntu1
File not found - /var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-fbc1-550_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
Get:10 file:/var/cuda-repo-ubuntu2204-12-4-local libnvidia-gl-550 550.54.15-0ubuntu1 [136 MB]
Err:10 file:/var/cuda-repo-ubuntu2204-12-4-local libnvidia-gl-550 550.54.15-0ubuntu1
File not found - /var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-gl-550_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
Get:11 file:/var/cuda-repo-ubuntu2204-12-4-local libnvidia-gl-550 550.54.15-0ubuntu1 [17.8 MB]
Err:11 file:/var/cuda-repo-ubuntu2204-12-4-local libnvidia-gl-550 550.54.15-0ubuntu1
File not found - /var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-gl-550_550.54.15-0ubuntu1_i386.deb (2: No such file or directory)
Get:12 file:/var/cuda-repo-ubuntu2204-12-4-local libxnvctrl0 550.54.15-0ubuntu1 [21.3 kB]
Err:12 file:/var/cuda-repo-ubuntu2204-12-4-local libxnvctrl0 550.54.15-0ubuntu1
File not found - /var/cuda-repo-ubuntu2204-12-4-local/./libxnvctrl0_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
Get:13 file:/var/cuda-repo-ubuntu2204-12-4-local nvidia-compute-utils-550 550.54.15-0ubuntu1 [118 kB]
Err:13 file:/var/cuda-repo-ubuntu2204-12-4-local nvidia-compute-utils-550 550.54.15-0ubuntu1
File not found - /var/cuda-repo-ubuntu2204-12-4-local/./nvidia-compute-utils-550_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
Get:14 file:/var/cuda-repo-ubuntu2204-12-4-local nvidia-kernel-source-550 550.54.15-0ubuntu1 [41.1 MB]
Err:14 file:/var/cuda-repo-ubuntu2204-12-4-local nvidia-kernel-source-550 550.54.15-0ubuntu1
File not found - /var/cuda-repo-ubuntu2204-12-4-local/./nvidia-kernel-source-550_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
Get:15 file:/var/cuda-repo-ubuntu2204-12-4-local nvidia-firmware-550-550.54.15 550.54.15-0ubuntu1 [36.8 MB]
Err:15 file:/var/cuda-repo-ubuntu2204-12-4-local nvidia-firmware-550-550.54.15 550.54.15-0ubuntu1
File not found - /var/cuda-repo-ubuntu2204-12-4-local/./nvidia-firmware-550-550.54.15_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
Get:16 file:/var/cuda-repo-ubuntu2204-12-4-local nvidia-kernel-common-550 550.54.15-0ubuntu1 [109 kB]
Err:16 file:/var/cuda-repo-ubuntu2204-12-4-local nvidia-kernel-common-550 550.54.15-0ubuntu1
File not found - /var/cuda-repo-ubuntu2204-12-4-local/./nvidia-kernel-common-550_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
Get:17 file:/var/cuda-repo-ubuntu2204-12-4-local nvidia-dkms-550 550.54.15-0ubuntu1 [36.2 kB]
Err:17 file:/var/cuda-repo-ubuntu2204-12-4-local nvidia-dkms-550 550.54.15-0ubuntu1
File not found - /var/cuda-repo-ubuntu2204-12-4-local/./nvidia-dkms-550_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
Get:18 file:/var/cuda-repo-ubuntu2204-12-4-local nvidia-utils-550 550.54.15-0ubuntu1 [494 kB]
Err:18 file:/var/cuda-repo-ubuntu2204-12-4-local nvidia-utils-550 550.54.15-0ubuntu1
File not found - /var/cuda-repo-ubuntu2204-12-4-local/./nvidia-utils-550_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
Get:19 file:/var/cuda-repo-ubuntu2204-12-4-local xserver-xorg-video-nvidia-550 550.54.15-0ubuntu1 [1,534 kB]
Err:19 file:/var/cuda-repo-ubuntu2204-12-4-local xserver-xorg-video-nvidia-550 550.54.15-0ubuntu1
File not found - /var/cuda-repo-ubuntu2204-12-4-local/./xserver-xorg-video-nvidia-550_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
Get:20 file:/var/cuda-repo-ubuntu2204-12-4-local nvidia-driver-550 550.54.15-0ubuntu1 [489 kB]
Err:20 file:/var/cuda-repo-ubuntu2204-12-4-local nvidia-driver-550 550.54.15-0ubuntu1
File not found - /var/cuda-repo-ubuntu2204-12-4-local/./nvidia-driver-550_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
Get:21 file:/var/cuda-repo-ubuntu2204-12-4-local nvidia-settings 550.54.15-0ubuntu1 [947 kB]
Err:21 file:/var/cuda-repo-ubuntu2204-12-4-local nvidia-settings 550.54.15-0ubuntu1
File not found - /var/cuda-repo-ubuntu2204-12-4-local/./nvidia-settings_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-cfg1-550_550.54.15-0ubuntu1_amd64.deb File not found - /var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-cfg1-550_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-common-550_550.54.15-0ubuntu1_all.deb File not found - /var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-common-550_550.54.15-0ubuntu1_all.deb (2: No such file or directory)
E: Failed to fetch file:/var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-decode-550_550.54.15-0ubuntu1_i386.deb File not found - /var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-decode-550_550.54.15-0ubuntu1_i386.deb (2: No such file or directory)
E: Failed to fetch file:/var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-decode-550_550.54.15-0ubuntu1_amd64.deb File not found - /var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-decode-550_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-encode-550_550.54.15-0ubuntu1_amd64.deb File not found - /var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-encode-550_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-encode-550_550.54.15-0ubuntu1_i386.deb File not found - /var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-encode-550_550.54.15-0ubuntu1_i386.deb (2: No such file or directory)
E: Failed to fetch file:/var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-extra-550_550.54.15-0ubuntu1_amd64.deb File not found - /var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-extra-550_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-fbc1-550_550.54.15-0ubuntu1_i386.deb File not found - /var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-fbc1-550_550.54.15-0ubuntu1_i386.deb (2: No such file or directory)
E: Failed to fetch file:/var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-fbc1-550_550.54.15-0ubuntu1_amd64.deb File not found - /var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-fbc1-550_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-gl-550_550.54.15-0ubuntu1_amd64.deb File not found - /var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-gl-550_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-gl-550_550.54.15-0ubuntu1_i386.deb File not found - /var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-gl-550_550.54.15-0ubuntu1_i386.deb (2: No such file or directory)
E: Failed to fetch file:/var/cuda-repo-ubuntu2204-12-4-local/./libxnvctrl0_550.54.15-0ubuntu1_amd64.deb File not found - /var/cuda-repo-ubuntu2204-12-4-local/./libxnvctrl0_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/var/cuda-repo-ubuntu2204-12-4-local/./nvidia-compute-utils-550_550.54.15-0ubuntu1_amd64.deb File not found - /var/cuda-repo-ubuntu2204-12-4-local/./nvidia-compute-utils-550_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/var/cuda-repo-ubuntu2204-12-4-local/./nvidia-kernel-source-550_550.54.15-0ubuntu1_amd64.deb File not found - /var/cuda-repo-ubuntu2204-12-4-local/./nvidia-kernel-source-550_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/var/cuda-repo-ubuntu2204-12-4-local/./nvidia-firmware-550-550.54.15_550.54.15-0ubuntu1_amd64.deb File not found - /var/cuda-repo-ubuntu2204-12-4-local/./nvidia-firmware-550-550.54.15_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/var/cuda-repo-ubuntu2204-12-4-local/./nvidia-kernel-common-550_550.54.15-0ubuntu1_amd64.deb File not found - /var/cuda-repo-ubuntu2204-12-4-local/./nvidia-kernel-common-550_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/var/cuda-repo-ubuntu2204-12-4-local/./nvidia-dkms-550_550.54.15-0ubuntu1_amd64.deb File not found - /var/cuda-repo-ubuntu2204-12-4-local/./nvidia-dkms-550_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/var/cuda-repo-ubuntu2204-12-4-local/./nvidia-utils-550_550.54.15-0ubuntu1_amd64.deb File not found - /var/cuda-repo-ubuntu2204-12-4-local/./nvidia-utils-550_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/var/cuda-repo-ubuntu2204-12-4-local/./xserver-xorg-video-nvidia-550_550.54.15-0ubuntu1_amd64.deb File not found - /var/cuda-repo-ubuntu2204-12-4-local/./xserver-xorg-video-nvidia-550_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/var/cuda-repo-ubuntu2204-12-4-local/./nvidia-driver-550_550.54.15-0ubuntu1_amd64.deb File not found - /var/cuda-repo-ubuntu2204-12-4-local/./nvidia-driver-550_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/var/cuda-repo-ubuntu2204-12-4-local/./nvidia-settings_550.54.15-0ubuntu1_amd64.deb File not found - /var/cuda-repo-ubuntu2204-12-4-local/./nvidia-settings_550.54.15-0ubuntu1_amd64.deb (2: No such file or directory)
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
有人能帮我解决这个问题吗?我需要用于 TensorFlow 的 NVIDIA 驱动程序和 CUDA 工具包。
答案1
可能原因
似乎存在依赖性问题nvidia-driver-550
(至少在 Ubuntu 22.04 上),它直接依赖于 ia:
linux-modules-nvidia-550-oem-22.04d
nvidia-kernel-common-550 (<= 550.54.15-1)
也nvidia-kernel-common-550 (>= 550.54.15)
nvidia-kernel-source-550 (= 550.54.15-0ubuntu1)
还有一些需要版本550.54.15-0ubuntu1
在层次结构中向下挖掘一层,我们发现,它
linux-modules-nvidia-550-oem-22.04d
本身依赖于nvidia-kernel-common-550 (>= 550.67)
。
这会导致安装预编译的内核版本550.54.15-0ubuntu1
,但驱动程序的部分功能需要较新的内核版本550.67
,从而产生冲突。
临时解决方法
对我来说(在我的笔记本电脑上)有效的解决方案如下:
- 我清除了所有 Nvidia 软件包:
sudo apt purge *nvidia*
重启
安装推荐的服务器版本
sudo ubuntu-drivers install --gpgpu
服务器版本的建议使用期限比常规版本更长,因此上述内容自动安装了nvidia-kernel-535-server
。
关于 Nvidia Kernel <-> CUDA <-> TensorFlow 兼容性的说明
三者的版本要兼容,Tensorflow 目前支持以下 CUDA 版本:Tensorflow GPU 支持矩阵。CUDA 和 Nvidia 驱动程序的当前兼容性可以找到这里. Nvidia 提供在本页有关为什么 CUDA 和 Nvidia 内核版本必须兼容以及如何解决问题的更多背景信息。