In the Ubuntu tutorial on enabling CUDA with WSL2,
and specifically in part 3,
you are directed to use apt-key
to point Ubuntu at the correct toolkit package. On Ubuntu 22.04 this will lead to the following warning whenever you run apt-get update
:
Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
To fix this, follow the instructions at Ask Ubuntu.
Here are those instructions tailored for the cudatools
installation:
-
List the keys
sudo apt-key list
-
Look for the section that mentions
cudatools
:/etc/apt/trusted.gpg -------------------- pub rsa4096 2022-04-14 [SC] EB69 3B30 35CD 5710 E231 E123 A4B4 6996 3BF8 63CC uid [ unknown] cudatools <cudatools@nvidia.com>
-
Export the key by taking the last 8 characters from the
pub
section without the space:sudo apt-key export 3BF863CC | sudo gpg --dearmour -o /usr/share/keyrings/nvidia.gpg
-
Edit the
apt
source list that points to the nvidia repo, mine was at:/etc/apt/sources.list.d/archive_uri-https_developer_download_nvidia_com_compute_cuda_repos_wsl-ubuntu_x86_64_-jammy.list
. Add a[signed-by=/usr/share/keyrings/nvidia.gpg]
tag to thedeb
entry:deb [signed-by=/usr/share/keyrings/nvidia.gpg] https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/ /
On next update, the warning will be gone.