Unable to install CUDA in Kubuntu 22.04

Hello,

I am trying to install CUDA 11.7 in Kubuntu 22.04 for this I have installed the .deb file : cuda-repo-ubuntu2204-11-7-local_11.7.0-515.43.04-1_amd64.deb

The problem I have is that I get the following error when I run
dpkg -i cuda-repo-ubuntu2204-11-7-local_11.7.0-515.43.04-1_amd64.deb

(Reading database ... 219844 files and directories currently installed.)
Preparing to unpack cuda-repo-ubuntu2204-11-7-local_11.7.0-515.43.04-1_amd64.deb ...
Unpacking cuda-repo-ubuntu2204-11-7-local (11.7.0-515.43.04-1) over (11.7.0-515.43.04-1) ...
Setting up cuda-repo-ubuntu2204-11-7-local (11.7.0-515.43.04-1) ...

The public CUDA GPG key does not appear to be installed.
To install the key, run this command:
sudo cp /var/cuda-repo-ubuntu2204-11-7-local/cuda-46B62B5F-keyring.gpg /usr/share/keyrings/

Which is clear in what I have to do. Hoever, even if I run
sudo cp /var/cuda-repo-ubuntu2204-11-7-local/cuda-46B62B5F-keyring.gpg /usr/share/keyrings/

I have the same problem as before. I checked and the gpg key is in /usr/share/keyrings but dpkg seems to not finding it.

Thank you for your help.

2 Likes

I have a similar problem (in Ubuntu 22.04).

1 Like

I kinda found a workaround.
Although it does not allow you to run dpkg -i cuda-repo… ecc
you can actually directly install cuda

sudo apt-get install cuda

Tried this, getting “E: Unable to locate package cuda”

Edit:
After reboot

sudo apt update
sudo apt upgrade
sudo apt-get install cuda

reboot

There were some gpg warnings on sudo apt update, but otherwise the install went well.