在安装新的 Nvidia 驱动程序之前,我是否必须删除当前的 Nvidia 驱动程序?

在安装新的 Nvidia 驱动程序之前,我是否必须删除当前的 Nvidia 驱动程序?

我在混合 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.

问题看起来是真的——390aptitude why-not驱动程序几乎与 410 驱动程序的每个部分都存在冲突(直接或间接)。在这种情况下:

  • 在安装 410 驱动程序之前,我是否需要卸载 390 驱动程序?(大概是这样的apt purge nvidia-driver-390 && apt autoremove --purge?)
  • 使用 Nvidia GPU 时这样做安全吗?如果我无法安装新驱动程序该怎么办?

答案1

  1. 需要... 否。建议... 是。通常,系统会先删除冲突的软件包(如旧驱动程序),然后再安装新软件包。
  2. 是的。系统将恢复使用通用驱动程序。

如果我无法安装新的驱动程序该怎么办?

您再次安装旧版本。您可能遇到的唯一真正问题是系统在启动过程中崩溃。在这种情况下,您可以从 grub rescue 中删除驱动程序。

如果其他方法都失败了...重新安装。因此,在执行任何操作之前,请备份所有个人文件。

相关内容