Can't install cuda on wsl2. "The public CUDA GPG key does not appear to be installed."

Thanks. I was tried to install cuDNN to ubuntu 20.04- cuda 11.7 and got this error message
I didn’t have cuda-archive-keyring.gpg so I didn’t need the backup.
I simply perform:

sudo cp /var/cudnn-local-repo-ubuntu2004-8.4.1.50/cudnn-local-E3EC4A60-keyring.gpg /usr/share/keyrings/cuda- archive-keyring.gpg

And then dpkg worked.

15 Likes