即使设置了 PPA,也无法安装 Nvidia 驱动程序

即使设置了 PPA,也无法安装 Nvidia 驱动程序

根据主题,我正在尝试在 Ubuntu 20.04 上安装驱动程序版本 455。我已启用 ppa:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update

我可以看到驱动程序作为包nvidia-graphics-drivers-455。但是当我尝试使用

ema@scv:~$ sudo apt install nvidia-graphics-drivers-455

我得到:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package nvidia-graphics-drivers-455

输出updatedist-upgrade

ema@scv:~$ sudo apt update && sudo apt dist-upgrade 
Hit:1 http://gb.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://gb.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://gb.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:4 http://archive.canonical.com/ubuntu focal InRelease
Hit:5 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu focal InRelease
Hit:6 http://ppa.launchpad.net/lutris-team/lutris/ubuntu focal InRelease                                    
Hit:7 http://security.ubuntu.com/ubuntu focal-security InRelease                                                                     
Hit:8 https://dl.winehq.org/wine-builds/ubuntu focal InRelease                                                                       
Hit:9 https://download.virtualbox.org/virtualbox/debian focal InRelease 
Reading package lists... Done                           
Building dependency tree       
Reading state information... Done
All packages are up-to-date.
N: Skipping acquisition of configured file 'contrib/binary-i386/Packages', as repository 'https://download.virtualbox.org/virtualbox/debian focal InRelease' doesn't support architecture 'i386'
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

现在我收到了包裹nvidia-driver-455,但是它告诉我以下内容:

ema@scv:~$ sudo apt install nvidia-driver-455
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-455 : Depends: libnvidia-gl-455 (= 455.23.04-0ubuntu0~0.20.04.1) but it is not going to be installed
                     Depends: nvidia-dkms-455 (<= 455.23.04-1) but it is not going to be installed
                     Depends: nvidia-dkms-455 (>= 455.23.04) but it is not going to be installed
                     Depends: nvidia-kernel-source-455 (= 455.23.04-0ubuntu0~0.20.04.1) but it is not going to be installed
                     Depends: libnvidia-extra-455 (= 455.23.04-0ubuntu0~0.20.04.1) but it is not going to be installed
                     Depends: nvidia-compute-utils-455 (= 455.23.04-0ubuntu0~0.20.04.1) but it is not going to be installed
                     Depends: libnvidia-decode-455 (= 455.23.04-0ubuntu0~0.20.04.1) but it is not going to be installed
                     Depends: libnvidia-encode-455 (= 455.23.04-0ubuntu0~0.20.04.1) but it is not going to be installed
                     Depends: nvidia-utils-455 (= 455.23.04-0ubuntu0~0.20.04.1) but it is not going to be installed
                     Depends: xserver-xorg-video-nvidia-455 (= 455.23.04-0ubuntu0~0.20.04.1) but it is not going to be installed
                     Depends: libnvidia-cfg1-455 (= 455.23.04-0ubuntu0~0.20.04.1) but it is not going to be installed
                     Depends: libnvidia-ifr1-455 (= 455.23.04-0ubuntu0~0.20.04.1) but it is not going to be installed
                     Depends: libnvidia-fbc1-455 (= 455.23.04-0ubuntu0~0.20.04.1) but it is not going to be installed
                     Recommends: libnvidia-compute-455:i386 (= 455.23.04-0ubuntu0~0.20.04.1)
                     Recommends: libnvidia-decode-455:i386 (= 455.23.04-0ubuntu0~0.20.04.1)
                     Recommends: libnvidia-encode-455:i386 (= 455.23.04-0ubuntu0~0.20.04.1)
                     Recommends: libnvidia-ifr1-455:i386 (= 455.23.04-0ubuntu0~0.20.04.1)
                     Recommends: libnvidia-fbc1-455:i386 (= 455.23.04-0ubuntu0~0.20.04.1)
                     Recommends: libnvidia-gl-455:i386 (= 455.23.04-0ubuntu0~0.20.04.1)
E: Unable to correct problems, you have held broken packages.

不知道发生了什么。有人知道为什么会发生这种情况吗?

谢谢!

答案1

最初的问题是因为如果一个人有多个条目

ppa:graphics-drivers/ppa

在全局 ppa 列表中,可能不会显示nvidia-driver-455。清理后,我就能看到元包了。

无法安装,因为我有版本450,因此以下命令可以解决问题:

sudo apt remove nvidia-driver-450
sudo apt install nvidia-driver-455

现在一切都好了。

第一个问题(重复的 ppa 条目)让我抓狂了一段时间。

答案2

以下对我有用:

sudo apt dist-upgrade

重启后,XOrg 驱动程序处于活动状态。现在我在 SoftwareUpdater 中选择了 455 驱动程序,然后安装并激活了 455 驱动程序。

答案3

对我来说,解决方案是手动删除每一个当前版本具有状态的包but it is not going to be installed

所以我的驱动程序版本是 440。我必须删除sudo apt purge libnvidia-gl-440所有这些驱动程序,等等。之后错误就消失了。

答案4

正确的命令是

sudo apt install nvidia-driver-455

相关内容