How do install CUDA 11.2 other than 11.4 on Ubuntu 18.04?

I’m trying to install CUDA 11.2 on Ubuntu 18.04

Here are the commands I tried

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.2.0/local_installers/cuda-repo-ubuntu1804-11-2-local_11.2.0-460.27.04-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1804-11-2-local_11.2.0-460.27.04-1_amd64.deb
sudo apt-key add /var/cuda-repo-ubuntu1804-11-2-local/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cuda

and then I got the latest version, that is, 11.4.

How do install CUDA 11.2 on Ubuntu 18.04?

Hi @shiqangpan,
This forum branch is dedicated to CUDA GDB support. Your question might be better suited for CUDA Setup and Installation - NVIDIA Developer Forums forum. I have moved your topic there.

1 Like