无法在 Ubuntu 18.04 上安装 Nvidia 驱动程序 510

无法在 Ubuntu 18.04 上安装 Nvidia 驱动程序 510

我尝试安装 nvidia 驱动程序 510,但出现以下错误:

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-510 : Depends: libnvidia-gl-510 (= 510.47.03-0ubuntu0.18.04.1) but it is not going to be installed
                     Depends: libnvidia-extra-510 (= 510.47.03-0ubuntu0.18.04.1) but it is not going to be installed
                     Depends: nvidia-compute-utils-510 (= 510.47.03-0ubuntu0.18.04.1) but it is not going to be installed
                     Depends: xserver-xorg-video-nvidia-510 (= 510.47.03-0ubuntu0.18.04.1) but it is not going to be installed
                     Depends: libnvidia-cfg1-510 (= 510.47.03-0ubuntu0.18.04.1) but it is not going to be installed
                     Depends: libnvidia-fbc1-510 (= 510.47.03-0ubuntu0.18.04.1) but it is not going to be installed
                     Recommends: libnvidia-decode-510:i386 (= 510.47.03-0ubuntu0.18.04.1)
                     Recommends: libnvidia-encode-510:i386 (= 510.47.03-0ubuntu0.18.04.1)
                     Recommends: libnvidia-fbc1-510:i386 (= 510.47.03-0ubuntu0.18.04.1)
                     Recommends: libnvidia-gl-510:i386 (= 510.47.03-0ubuntu0.18.04.1)
E: Unable to correct problems, you have held broken packages.

有什么我可以尝试的吗?

我尝试过寻找保留的包裹:

dpkg --get-selections | grep hold

并且没有输出

答案1

我在 ubuntu 20 上有同样的错误消息(尝试从 driver-470 更新到 driver-510)。

GAD3R 添加 Canonical Kernel repo 的解决方案对我不起作用,GUI 驱动程序更新过程也不起作用。

使用nvidia的运行文件直接就成功安装了510驱动。

请注意,我必须退出 GUI 才能终止使用 GPU 的进程/应用程序。

CTL + ALT + F1 (to go to a terminal only interface)

然后通过 ssh 连接或通过仅终端界面重新登录后...

sudo stop lightdm

或者

sudo stop gdm

最后

sudo sh NVIDIA-Linux-x86_64-510.47.03.run

并按照提示操作。

尽管我的问题已经解决,但我仍然是一个 Linux 菜鸟,想知道还有哪些其他策略可能有效。

答案2

您需要添加 Canonical Kernel Team 存储库:

sudo add-apt-repository ppa:canonical-kernel-team/ppa 
sudo apt-get update
sudo apt install nvidia-driver-510

相关内容