Nvidia驱动安装未满足依赖

Nvidia driver installation unmet dependencies

我有一台带 1060 GPU 的笔记本电脑,已设置 Ubuntu 20.04。我已经安装了 nvidia-driver-460 + cuda 11.2 并一直工作到今天。我今天尝试安装 ROS,在 this link 之后添加源和密钥后,它不允许我安装 ROS,说有些软件包有 unmet dependencies。之后我发布了 apt autoremove 并删除了 nvidia 驱动程序cuda.

我仍然无法安装 ROS,现在尝试做 apt install nvidia-driver-460 也给我 unmet dependencies。这是 sudo ubuntu-drivers autoinstall 的输出,类似于 apt install 命令输出

Reading package lists... Done
Building dependenc    y 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:
 linux-modules-nvidia-460-generic-hwe-20.04 : Depends: nvidia-kernel-common-460 (>= 460.39) but 460.32.03-0ubuntu1 is to be installed
 nvidia-driver-460 : Depends: libnvidia-gl-460 (= 460.32.03-0ubuntu1) but it is not going to be installed
                     Depends: libnvidia-ifr1-460 (= 460.32.03-0ubuntu1) but it is not going to be installed
                     Recommends: libnvidia-compute-460:i386 (= 460.32.03-0ubuntu1)
                     Recommends: libnvidia-decode-460:i386 (= 460.32.03-0ubuntu1)
                     Recommends: libnvidia-encode-460:i386 (= 460.32.03-0ubuntu1)
                     Recommends: libnvidia-ifr1-460:i386 (= 460.32.03-0ubuntu1)
                     Recommends: libnvidia-fbc1-460:i386 (= 460.32.03-0ubuntu1)
                     Recommends: libnvidia-gl-460:i386 (= 460.32.03-0ubuntu1)
E: Unable to correct problems, you have held broken packages.

这是我迄今为止尝试过但没有奏效的方法

  1. apt purge *nvidia*apt autoremoveapt autoclean 并重新安装驱动程序
  2. sudo apt -f install 并重新安装驱动程序
  3. sudo apt-add-repository -r ppa:graphics-drivers/ppa 并重新安装驱动程序

到目前为止,我从 apt install nvidia-driver-460 获得的输出没有任何变化。非常感谢任何帮助。


我在 Core i7 机器上安装了 64 位 Ubuntu。那么,为什么我在 apt 安装输出中看到 i386?

$ uname -a
Linux XXXX 5.8.0-44-generic #50~20.04.1-Ubuntu SMP Wed Feb 10 21:07:30 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:    20.04
Codename:   focal

启用 restricted 存储库和安全更新:

sudo add-apt-repository restricted
echo "deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse" |\
sudo tee -a /etc/apt/sources.list

然后 运行:

sudo apt update
sudo apt install nvidia-kernel-common-460 nvidia-driver-460

取消选中 软件和更新 中的 cuda 存储库 就成功了。 (图中的第 5 个)