Ubunt 16.04 Cuda 8.deb 未满足依赖关系错误

Ubunt 16.04 Cuda 8.deb 未满足依赖关系错误
$ sudo dpkg -i cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb
$ sudo dpkg -i cuda-repo-ubuntu1604-8-0-local-cublas-performance-update_8.0.61-1_amd64.deb
$ sudo apt-get update
$ sudo apt-get install cuda-8-0

我在几台 Ubuntu 机器上使用 .deb 文件和上述命令安装了 cuda 8。但是当我在新的 GPU 服务器机器上尝试此操作时,遇到了以下错误。(我的 Ubuntu 版本是 16.04.2 LTS)

gpu01@MLILAB:~/Downloads$ sudo apt-get install cuda-8-0
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:
 cuda-8-0 : Depends: cuda-toolkit-8-0 (>= 8.0.61) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

有谁遇到过同样的错误或知道如何解决吗?

我需要你的帮助 :)

(我必须使用 CUDA 8 而不是其他版本的 TT)

答案1

我希望你已经成功了。我也遇到了同样的错误,但最终成功了。

我按照你引用的命令做了什么:

我删除了刚刚安装的两个包:

# apt list --installed | grep -i cuda
cuda-repo-ubuntu1604-8-0-local-cublas-performance-update/now 8.0.61-1 amd64 [installed,local]
cuda-repo-ubuntu1604-8-0-local-ga2/now 8.0.61-1 amd64 [installed,local]

# apt remove cuda-repo-ubuntu1604-8-0-local-ga2
# apt remove cuda-repo-ubuntu1604-8-0-local-cublas-performance-update
# rm /etc/apt/sources.list.d/cuda-8-0-local-ga2.list
# rm /etc/apt/sources.list.d/cuda-8-0-local-cublas-performance-update.list

在里面CUDA 工具包 8.0 - 2017 年 2 月下载网页,这次我选择的是 Linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network),而不是 deb (local)。然后安装下载的 deb 包(2.6K 字节)

# dpkg -i cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
# apt list --installed | grep -i cuda
cuda-repo-ubuntu1604/now 8.0.61-1 amd64 [installed,local]

它安装了一个指向 CUDA 网络存储库的文件。

# cat /etc/apt/sources.list.d/cuda.list
deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /

现在,再次尝试安装 CUDA 8:

# aptitude install cuda-8-0
...

# apt list --installed | grep -i cuda
cuda-8-0/unknown,now 8.0.61-1 amd64 [installed]
cuda-command-line-tools-8-0/unknown,now 8.0.61-1 amd64 [installed,automatic]
cuda-core-8-0/unknown,now 8.0.61-1 amd64 [installed,automatic]
...

CUDA Toolkit 8.0 安装成功,没有任何依赖性错误。

我学到

似乎安装会cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb在目录中设置一个 CUDA 本地存储库/var/cuda-repo-8-0-local-ga2/etc/apt/sources.list.d/cuda-8-0-local-ga2.list指向该存储库。apt-get install cuda然后会从该目录中获取 deb 包。我猜想该存储库中似乎缺少与依赖项要求相关的一些包。相比之下,CUDA 网络存储库可能比这样的本地存储库拥有更多的包,这将解决依赖项要求。不过,这只是我的猜测。

截至今天(2017 年 12 月),aptitude install cuda将安装 cuda-9.1,因此如果我们使用 CUDA 8,我们将需要明确指定 cuda-8-0。

只是额外的信息。我错误地删除了 CUDA 存储库的签名密钥,并在过程中遇到错误apt-get update

# apt-key del 7FA2AF80
# apt-get update
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F60F4B3D7FA2AF80
  ...

重新安装解决了这个小问题。

# wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
# apt-key add 7fa2af80.pub
# apt-get update
Reading package lists... Done

希望这篇文章能帮助那些遇到同样错误的人。谢谢。

相关内容