- LD_LIBRARY_PATH includes /usr/local/cuda-12.1/lib64, or, add /usr/local/cuda-12.1/lib64 to /etc/ld.so.conf and run ldconfig as root
To uninstall the CUDA Toolkit, run cuda-uninstaller in /usr/local/cuda-12.1/bin
***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 530.00 is required for CUDA 12.1 functionality to work.
To install the driver using this installer, run the following command, replacing <CudaInstaller> with the name of this run file:
sudo <CudaInstaller>.run --silent --driver
Logfile is /var/log/cuda-installer.log
复制代码
从输出信息中也能看到对环境变量有要求:
Please make sure that
- PATH includes /usr/local/cuda-12.1/bin
- LD_LIBRARY_PATH includes /usr/local/cuda-12.1/lib64, or, add /usr/local/cuda-12.1/lib64 to /etc/ld.so.conf and run ldconfig as root
.tar压缩包安装方式
我的下载版本为:
cuDNN v8.9.7 (December 5th, 2023), for CUDA 12.x 的 Local Installer for Linux x86_64 (Tar)
得到文件cudnn-linux-x86_64-8.9.7.29_cuda12-archive.tar.xz
.deb包安装方式
我的下载版本为:
cuDNN v8.9.7 (December 5th, 2023), for CUDA 12.x 的 Local Installer for Ubuntu22.04 x86_64 (Deb)
得到文件cudnn-local-repo-ubuntu2204-8.9.7.29_1.0-1_amd64.deb
到现在为止都是与官网一样的,但是接下来的步骤,官网写着:
To install for CUDA 11, run:sudo apt-get -y install cudnn9-cuda-11
To install for CUDA 12, run:sudo apt-get -y install cudnn9-cuda-12
但现实上会找不到cudnn9-cuda-12这个包: