我在混合 Nvidia 笔记本电脑上使用 Ubuntu 18.04,并带有 Ubuntu 打包的 Nvidia 390 驱动程序。我想升级到版本 410 驱动程序,所以我添加了图形驱动程序 PPA 并尝试安装它们,因为我在网上找到的所有地方都建议你只需要这样做。相反,apt 大喊安装新驱动程序会导致的大量依赖问题:
$ sudo apt install nvidia-driver-410
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 to resolve the situation:
The following packages have unmet dependencies.
nvidia-driver-410 : Depends: libnvidia-gl-410 (= 410.78-0ubuntu1~gpu18.04.1) but it is not going to be installed
Depends: nvidia-dkms-410 (= 410.78-0ubuntu1~gpu18.04.1) but it is not going to be installed
Depends: nvidia-kernel-source-410 (= 410.78-0ubuntu1~gpu18.04.1) but it is not going to be installed
Depends: libnvidia-compute-410 (= 410.78-0ubuntu1~gpu18.04.1) but it is not going to be installed
Depends: nvidia-compute-utils-410 (= 410.78-0ubuntu1~gpu18.04.1) but it is not going to be installed
Depends: libnvidia-decode-410 (= 410.78-0ubuntu1~gpu18.04.1) but it is not going to be installed
Depends: libnvidia-encode-410 (= 410.78-0ubuntu1~gpu18.04.1) but it is not going to be installed
Depends: nvidia-utils-410 (= 410.78-0ubuntu1~gpu18.04.1) but it is not going to be installed
Depends: libnvidia-ifr1-410 (= 410.78-0ubuntu1~gpu18.04.1) but it is not going to be installed
Recommends: libnvidia-compute-410:i386 (= 410.78-0ubuntu1~gpu18.04.1)
Recommends: libnvidia-decode-410:i386 (= 410.78-0ubuntu1~gpu18.04.1)
Recommends: libnvidia-encode-410:i386 (= 410.78-0ubuntu1~gpu18.04.1)
Recommends: libnvidia-ifr1-410:i386 (= 410.78-0ubuntu1~gpu18.04.1)
E: Unable to correct problems, you have held broken packages.
这些问题看起来很真实——aptitude why-not
说 390 驱动程序与 410 驱动程序的几乎每个部分发生冲突(直接或间接)。在这种情况下:
- 在安装 410 驱动程序之前是否需要卸载 390 驱动程序?(大概是这样的
apt purge nvidia-driver-390 && apt autoremove --purge
?) - 使用 Nvidia GPU 时这样做是否安全?如果我无法安装新的驱动程序怎么办?
您再次安装旧版本。您可能遇到的唯一真正问题是系统在启动期间崩溃。在这种情况下,您可以从 grub 救援中删除驱动程序。
如果一切都失败了......重新安装。因此,在您做任何事情之前,请备份您的所有个人文件。