我正在尝试安装cuda 9.0而不是cuda 9.2,因为tensorflow与它不兼容。我尝试了以下几点:
aims@aims:~/Downloads$ sudo dpkg -i "cuda-repo-ubuntu1604_9.0.176-1_amd64(1).deb"
(Reading database ... 212533 files and directories currently installed.)
Preparing to unpack cuda-repo-ubuntu1604_9.0.176-1_amd64(1).deb ...
Unpacking cuda-repo-ubuntu1604 (9.0.176-1) over (9.0.176-1) ...
Setting up cuda-repo-ubuntu1604 (9.0.176-1) ...
aims@aims:~/Downloads$ sudo apt-get update
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Ign:2 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 InRelease
Hit:3 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu xenial InRelease
Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:5 http://archive.ubuntu.com/ubuntu xenial InRelease
Hit:6 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 Release
Hit:8 http://dl.google.com/linux/chrome/deb stable Release
Hit:9 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:11 http://archive.canonical.com xenial InRelease
Hit:12 http://ppa.launchpad.net/nemh/systemback/ubuntu xenial InRelease
Reading package lists... Done
aims@aims:~/Downloads$ sudo apt-get install cuda
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
cuda-9-2 cuda-command-line-tools-9-2 cuda-compiler-9-2 cuda-cublas-9-2 cuda-cublas-dev-9-2 cuda-cudart-9-2 cuda-cudart-dev-9-2 cuda-cufft-9-2 cuda-cufft-dev-9-2 cuda-cuobjdump-9-2 cuda-cupti-9-2 cuda-curand-9-2 cuda-curand-dev-9-2 cuda-cusolver-9-2 cuda-cusolver-dev-9-2
cuda-cusparse-9-2 cuda-cusparse-dev-9-2 cuda-demo-suite-9-2 cuda-documentation-9-2 cuda-driver-dev-9-2 cuda-drivers cuda-gdb-9-2 cuda-gpu-library-advisor-9-2 cuda-libraries-9-2 cuda-libraries-dev-9-2 cuda-license-9-2 cuda-memcheck-9-2 cuda-misc-headers-9-2 cuda-npp-9-2
cuda-npp-dev-9-2 cuda-nsight-9-2 cuda-nvcc-9-2 cuda-nvdisasm-9-2 cuda-nvgraph-9-2 cuda-nvgraph-dev-9-2 cuda-nvml-dev-9-2 cuda-nvprof-9-2 cuda-nvprune-9-2 cuda-nvrtc-9-2 cuda-nvrtc-dev-9-2 cuda-nvtx-9-2 cuda-nvvp-9-2 cuda-runtime-9-2 cuda-samples-9-2 cuda-toolkit-9-2
cuda-tools-9-2 cuda-visual-tools-9-2
The following NEW packages will be installed:
cuda cuda-9-2 cuda-command-line-tools-9-2 cuda-compiler-9-2 cuda-cublas-9-2 cuda-cublas-dev-9-2 cuda-cudart-9-2 cuda-cudart-dev-9-2 cuda-cufft-9-2 cuda-cufft-dev-9-2 cuda-cuobjdump-9-2 cuda-cupti-9-2 cuda-curand-9-2 cuda-curand-dev-9-2 cuda-cusolver-9-2
cuda-cusolver-dev-9-2 cuda-cusparse-9-2 cuda-cusparse-dev-9-2 cuda-demo-suite-9-2 cuda-documentation-9-2 cuda-driver-dev-9-2 cuda-drivers cuda-gdb-9-2 cuda-gpu-library-advisor-9-2 cuda-libraries-9-2 cuda-libraries-dev-9-2 cuda-license-9-2 cuda-memcheck-9-2
cuda-misc-headers-9-2 cuda-npp-9-2 cuda-npp-dev-9-2 cuda-nsight-9-2 cuda-nvcc-9-2 cuda-nvdisasm-9-2 cuda-nvgraph-9-2 cuda-nvgraph-dev-9-2 cuda-nvml-dev-9-2 cuda-nvprof-9-2 cuda-nvprune-9-2 cuda-nvrtc-9-2 cuda-nvrtc-dev-9-2 cuda-nvtx-9-2 cuda-nvvp-9-2 cuda-runtime-9-2
cuda-samples-9-2 cuda-toolkit-9-2 cuda-tools-9-2 cuda-visual-tools-9-2
0 upgraded, 48 newly installed, 0 to remove and 4 not upgraded.
Need to get 0 B/1,145 MB of archives.
After this operation, 2,642 MB of additional disk space will be used.
Do you want to continue? [Y/n] 正如您所看到的,Cuda 9.2在任何地方都得到了反映,尽管我还没有添加它。之前,我添加了,但在进行9.0之前,我已经清除了库达9.2。但在安装过程中遇到了问题。请帮帮我。
发布于 2018-07-12 13:41:58
回购http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_[64]包含9.0、9.1和9.2。
当您运行sudo apt install cuda时,它将自动选择最新版本。相反,您应该在安装过程中指定版本:
sudo apt install cuda-9-0然后在安装后暂停它,以便以后运行sudo apt upgrade时不会尝试将其升级到该存储库中的最新版本:
sudo apt hold cuda-9-0我在https://askubuntu.com/a/1025949/231142上找到了一个关于在16.04安装所有3个版本的CUDA的答案
发布于 2018-07-12 13:28:24
当您安装cuda-repo-ubuntu1604_9.0.176-1_amd64(1).deb文件时,它将其存储库添加到/etc/apt/sources.list.d目录中。转到Sourcees.list.d目录并删除它们。
sudo rm /etc/apt/sources.list.d/cuda*
sudo apt update现在它将不会更新到v9.2
https://askubuntu.com/questions/1054514
复制相似问题