我遵循此处提供的命令链: https: //developer.nvidia.com/cuda-downloads? target_os=Linux&target_arch=x86_64&Distribution=WSL-Ubuntu&target_version=2.0&target_type=deb_local 在 wsl2 上安装 cuda (v11.6)。然而,最后三行失败了。这是终端中的内容:
(base) peter72@Peter72:~$ sudo apt-key add /var/cuda-repo-wsl-ubuntu-11-6-local/7fa2af80.pub
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK
(base) peter72@Peter72:~$ sudo apt-get update
Get:1 file:/var/cuda-repo-wsl-ubuntu-11-5-local InRelease
Ign:1 file:/var/cuda-repo-wsl-ubuntu-11-5-local InRelease
Get:2 file:/var/cuda-repo-wsl-ubuntu-11-6-local InRelease
Ign:2 file:/var/cuda-repo-wsl-ubuntu-11-6-local InRelease
Get:3 file:/var/cuda-repo-wsl-ubuntu-11-5-local Release
Err:3 file:/var/cuda-repo-wsl-ubuntu-11-5-local Release
File not found - /var/cuda-repo-wsl-ubuntu-11-5-local/Release (2: No such file or directory)
Get:4 file:/var/cuda-repo-wsl-ubuntu-11-6-local Release [564 B]
Get:4 file:/var/cuda-repo-wsl-ubuntu-11-6-local Release [564 B]
Get:6 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Hit:7 https://nvidia.github.io/libnvidia-container/stable/ubuntu18.04/amd64 …Run Code Online (Sandbox Code Playgroud)