
我嘗試在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')
然後我嘗試在上搜尋 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
我發現了一些有用的鏈接這個帖子但不幸的是,最後一個版本是 gcc 7.3 我的最後一個選擇是從原始碼構建,但除此之外還有其他選擇嗎?我不確定我的計算機能否在相當長的時間內處理編譯。