安装 NVidia 460 驱动程序时未满足的依赖关系

安装 NVidia 460 驱动程序时未满足的依赖关系

看来我无法将驱动程序从 450 升级到 460。以下是输出:

$ nvidia-smi
Tue Mar  2 10:12:34 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.102.04   Driver Version: 450.102.04   CUDA Version: 11.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX 1050    Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   64C    P0    N/A /  N/A |   1086MiB /  2000MiB |     36%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1421      G   /usr/lib/xorg/Xorg                192MiB |
|    0   N/A  N/A      6321      G   /usr/lib/xorg/Xorg                459MiB |
|    0   N/A  N/A      6494      G   /usr/bin/gnome-shell              332MiB |
|    0   N/A  N/A      7090      G   /usr/lib/firefox/firefox            1MiB |
|    0   N/A  N/A      8188      G   /usr/lib/firefox/firefox            1MiB |
|    0   N/A  N/A      9017      G   /usr/lib/firefox/firefox            1MiB |
|    0   N/A  N/A      9064      G   /usr/lib/firefox/firefox            1MiB |
|    0   N/A  N/A      9227      G   /usr/lib/firefox/firefox            1MiB |
|    0   N/A  N/A      9731      G   /usr/lib/firefox/firefox            1MiB |
|    0   N/A  N/A     12448      G   /usr/lib/firefox/firefox            1MiB |
|    0   N/A  N/A     24608      G   /usr/lib/firefox/firefox            1MiB |
|    0   N/A  N/A     99825      G   .../.steam/ubuntu12_32/steam       33MiB |
|    0   N/A  N/A     99834      G   ./steamwebhelper                    1MiB |
|    0   N/A  N/A     99847      G   ...AAAAAAAgAAAAAAAAA --log-f       39MiB |
+-----------------------------------------------------------------------------+
$ sudo apt install nvidia-driver-460
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help resolve the situation:

The following packages have unmet dependencies:
 nvidia-driver-460 : Depends: libnvidia-gl-460 (= 460.39-0ubuntu0.20.04.1) but it is not going to be installed
                     Depends: libnvidia-extra-460 (= 460.39-0ubuntu0.20.04.1) but it is not going to be installed
                     Depends: nvidia-compute-utils-460 (= 460.39-0ubuntu0.20.04.1) but it is not going to be installed
                     Depends: libnvidia-decode-460 (= 460.39-0ubuntu0.20.04.1) but it is not going to be installed
                     Depends: libnvidia-encode-460 (= 460.39-0ubuntu0.20.04.1) but it is not going to be installed
                     Depends: nvidia-utils-460 (= 460.39-0ubuntu0.20.04.1) but it is not going to be installed
                     Depends: xserver-xorg-video-nvidia-460 (= 460.39-0ubuntu0.20.04.1) but it is not going to be installed
                     Depends: libnvidia-cfg1-460 (= 460.39-0ubuntu0.20.04.1) but it is not going to be installed
                     Depends: libnvidia-ifr1-460 (= 460.39-0ubuntu0.20.04.1) but it is not going to be installed
                     Depends: libnvidia-fbc1-460 (= 460.39-0ubuntu0.20.04.1) but it is not going to be installed
                     Recommends: libnvidia-decode-460:i386 (= 460.39-0ubuntu0.20.04.1)
                     Recommends: libnvidia-encode-460:i386 (= 460.39-0ubuntu0.20.04.1)
                     Recommends: libnvidia-ifr1-460:i386 (= 460.39-0ubuntu0.20.04.1)
                     Recommends: libnvidia-fbc1-460:i386 (= 460.39-0ubuntu0.20.04.1)
                     Recommends: libnvidia-gl-460:i386 (= 460.39-0ubuntu0.20.04.1)

我在网上查了一下,有人说要先清除,但我怀疑这行不通。我想知道有没有人经历过这种升级路径?还是我应该等待下一个驱动程序?

答案1

您可以尝试sudo apt --fix-broken install,但我不确定它是否能解决您的问题。

人们说要先清除,但我怀疑这行不通

你为什么怀疑这一点?根据 nvidia 文档,你必须先清除旧版本,然后才能安装新版本。尝试:

sudo apt purge nvidia-*
sudo apt autoremove

此时您可能需要重新启动(如果出现空白屏幕,请不要惊慌。您可以使用 alt-ctrl-F1 登录并安装新的 nvidia 驱动程序或切换到使用 nouveau 直到安装完成)

相关内容