Source: https://askubuntu.com/questions/1491254/installing-cuda-on-ubuntu-23-10-libt5info-not-installable
CUDA 12.4 is not available for Ubuntu 24.04. If you try to install the .deb for 22.04 you may get an error like
The following packages have unmet dependencies:
nsight-systems-2023.4.4 : Depends: libtinfo5 but it is not installable
To fix this:
sudo nano /etc/apt/sources.list.d/ubuntu.sources
Add:
Types: deb
URIs: http://old-releases.ubuntu.com/ubuntu/
Suites: lunar
Components: universe
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
After this, you can install CUDA following the instructions for 22.04:
curl -O https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin
sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600
curl -O https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda-repo-ubuntu2204-12-4-local_12.4.0-550.54.14-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2204-12-4-local_12.4.0-550.54.14-1_amd64.deb
sudo cp /var/cuda-repo-ubuntu2204-12-4-local/cuda-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cuda-toolkit-12-4
If you already downloaded/copied the files, don't forget the
apt update
part before tryingapt install
again.
Some tools expect CUDA_HOME. Set it as follows:
export CUDA_HOME=/usr/local/cuda-12.4/
If you need nvcc
or other tools:
sudo apt install nvidia-cuda-toolkit
If you happen to be on a system with a slow network connection behind a proxy, add these files in /etc/apt/apt.conf.d
:
99proxy:
Acquire::http::Proxy "http://proxy.example.com:912";
Acquire::https::Proxy "http://proxy.example.com:912";
99timeout:
Acquire::http::Timeout "120";
Acquire::ftp::Timeout "120";
Acquire::Retries "5";