18

Today I've installed from scratch Ubuntu 23.10 on my computer. After having installed all the software I need, I tried to install CUDA from the NVIDIA website, following their instructions: https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=22.04&target_type=deb_local

There's written that the latest version supported is 22.04 anyway I tried..., the problem happens with the last command sudo apt-get -y install cuda-toolkit-12-3 because the terminal gives me an error:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies: nsight-systems-2023.3.3 : Depends: libtinfo5 but it is not installable E: Unable to correct problems, you have held broken packages.

I tried to manually install such library but I get E: Package 'libtinfo5' has no installation candidate

Is there any way to install cuda on this system ?

noisefloor
  • 1,769
Dresult
  • 333

5 Answers5

36

For Ubuntu 23.10:

The libtinfo5 package isn't available in Ubuntu 23.10's default repositories yet. We can install it by adding the universe repo for Ubuntu 23.04 (Lunar Lobster).

Open a terminal window and run:

sudo nano /etc/apt/sources.list

Add this line (adds the Ubuntu 23.04 aka "Lunar Lobster" universe repository to apt):

deb http://old-releases.ubuntu.com/ubuntu/ lunar universe

Save and exit, then run:

sudo apt update

...and now the install command for CUDA should work, automatically downloading and installing libtinfo5 while installing CUDA.

For Ubuntu 24.04 or newer:

  1. Open the new file for storing the sources list

    sudo nano /etc/apt/sources.list.d/ubuntu.sources
    
  2. Paste in the following at the end of the file:

Types: deb
URIs: http://old-releases.ubuntu.com/ubuntu/
Suites: lunar
Components: universe
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
  1. Save the file and run sudo apt update - now the install command for CUDA should work.
jspinella
  • 476
  • 3
  • 6
6

The lunar suite is no longer available at the URI http://archive.ubuntu.com/ubuntu/. It is now at http://old-releases.ubuntu.com/ubuntu/. So for Ubuntu 24.04 or newer, the added source entry becomes,

Types: deb
URIs: http://old-releases.ubuntu.com/ubuntu/
Suites: lunar
Components: universe
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

(I would have made a comment or suggested an edit, but looks like I am unable to.)

5

I was able to install manually the package needed from the Ubuntu 23.04 (lunar) repo: https://packages.ubuntu.com/lunar/libtinfo5. Then, running sudo apt install cuda resulted in no errors and CUDA was correctly installed.

Dresult
  • 333
0

I just yoinked it from this site with these commands:

wget http://launchpadlibrarian.net/371711898/libtinfo5_6.1-1ubuntu1.18.04_amd64.deb
sudo dpkg -i libtinfo5_6.1-1ubuntu1.18.04_amd64.deb

then try the cuda installer again

Rosski
  • 1
0

libtinfo5 for Ubuntu 20.04LTS can be found from https://packages.ubuntu.com/.

Download libtinfo5_6.3-*.deb from https://packages.ubuntu.com/jammy/libtinfo5 and intall it via sudo dpkg -i libtinfo5_6.3-*.deb.

J. Choi
  • 101