【问题标题】:Unable to install TensorFlow using apt on Ubuntu 18.04 - unmet dependencies on nvidia-driver-418无法在 Ubuntu 18.04 上使用 apt 安装 TensorFlow - 未满足对 nvidia-driver-418 的依赖
【发布时间】:2019-07-29 17:50:40
【问题描述】:

我正在关注these instructions 安装TensorFlow。

当我尝试运行命令 sudo apt-get install --no-install-recommends nvidia-driver-418 时,出现错误

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-418 : Depends: nvidia-driver-430 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我不是 Linux 专家,因此驱动程序 418 依赖于驱动程序 430 的说法让我很困惑。

【问题讨论】:

  • 10.0 工具包有更新版本;尝试 cuda-repo-ubuntu1804_10.1.168-1_amd64.deb 而不是 cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
  • 这很尴尬:只需要sudo apt upgrade。显然,较早的步骤导致需要升级的东西。可能相关的@Michael 评论。

标签: tensorflow linux-device-driver nvidia


【解决方案1】:

运行:sudo apt-get -f install 修复损坏的包。然后sudo apt update。之后,按照教程进行操作。最后:

pip3 install tensorflow-gpu

【讨论】:

    【解决方案2】:

    删除已安装的 nvidia-driver。

    运行:

    apt remove nvidia-driver-*
    

    然后重试:

    sudo apt-get install --no-install-recommends nvidia-driver-418
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-09-18
      • 2017-11-17
      • 1970-01-01
      • 2018-12-01
      • 1970-01-01
      • 2017-10-03
      • 2015-01-13
      • 2016-01-06
      相关资源
      最近更新 更多