【问题标题】:Nvidia driver installation unmet dependencies [closed]Nvidia驱动程序安装未满足的依赖项[关闭]
【发布时间】:2021-02-26 05:54:38
【问题描述】:

我有一台装有 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 得到的输出没有任何改变。非常感谢任何帮助。


我在核心 i7 机器上安装了 64 位 Ubuntu。那么为什么我在 apt install 输出中看到 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

【问题讨论】:

    标签: linux ubuntu graphics nvidia apt


    【解决方案1】:

    Software & Updates 中取消选中 cuda repo 就可以了。 (这张图片中的第5个)

    【讨论】:

      【解决方案2】:

      启用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
      

      【讨论】:

      • 我通过从 Software & Updates 中删除 cuda repo 解决了这个问题。但希望这个答案将来可能对某人有用
      猜你喜欢
      • 1970-01-01
      • 2017-11-17
      • 1970-01-01
      • 1970-01-01
      • 2013-04-19
      • 1970-01-01
      • 1970-01-01
      • 2022-07-07
      • 2013-07-29
      相关资源
      最近更新 更多