【发布时间】:2019-11-14 14:26:54
【问题描述】:
我尝试在 Fedora 31 上安装 CUDA,但在最后一步卡住了,因为 CUDA 正式支持 Fedora 29 (gcc 8.2),而 Fedora 31 附带的版本是 9.2,然后我安装了支持 CUDA 的 Pytorch,毫无意外, CUDA 支持不存在:
>>> import torch
>>> device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
>>> device
device(type='cpu')
然后我尝试在pkgs 上搜索 gcc、g++ 和 gfortran,但陷入了依赖地狱,例如:
sudo dnf install gcc-8.2.1-2.fc29.x86_64.rpm gcc-gfortran-8.2.1-2.fc29.x86_64.rpm gcc-c++-8.2.1-2.fc29.x86_64.rpm -y
Error:
Problem 1: conflicting requests
- nothing provides cpp = 8.2.1-2.fc29 needed by gcc-8.2.1-2.fc29.x86_64
- nothing provides libgomp = 8.2.1-2.fc29 needed by gcc-8.2.1-2.fc29.x86_64
Problem 2: conflicting requests
- nothing provides libgfortran = 8.2.1-2.fc29 needed by gcc-gfortran-8.2.1-2.fc29.x86_64
- nothing provides libquadmath = 8.2.1-2.fc29 needed by gcc-gfortran-8.2.1-2.fc29.x86_64
- nothing provides libquadmath-devel = 8.2.1-2.fc29 needed by gcc-gfortran-8.2.1-2.fc29.x86_64
Problem 3: conflicting requests
- nothing provides libstdc++ = 8.2.1-2.fc29 needed by gcc-c++-8.2.1-2.fc29.x86_64
- nothing provides libstdc++-devel = 8.2.1-2.fc29 needed by gcc-c++-8.2.1-2.fc29.x86_64
我在this post 上找到了一堆有用的链接,但不幸的是最后一个版本是 gcc 7.3 我的最后一个选择是从源代码构建,但除此之外还有其他选择吗?我不确定我的计算机能否在相当长的时间内完成编译。
【问题讨论】:
-
也参考。您在这里的评论:stackoverflow.com/questions/47175706/… .... 我想我可以在几天内回答。 ...您确定 CUDA 不能使用 {gcc, g++, gfortran} 9.2 版吗?
-
我没有尝试,因为来自 negativo repo 的 CUDA 明确需要 gcc 8.2
-
使用包含您所针对的 gcc 和 glibc 版本的发行版建立一个 vm 通常很容易。
-
其实这是一个非常好的主意,我想我需要阅读一下gpu passthrough
标签: python-3.x linux gcc pytorch