0
点赞
收藏
分享

微信扫一扫

WSL安装CUDA

安装命令

  1. 删除旧的GPG key
sudo apt-key del 7fa2af80
  1. 安装
wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin
sudo mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.7.0/local_installers/cuda-repo-wsl-ubuntu-11-7-local_11.7.0-1_amd64.deb
sudo dpkg -i cuda-repo-wsl-ubuntu-11-7-local_11.7.0-1_amd64.deb
sudo apt-get update
sudo apt-get -y install cuda

安装过程中遇到的问题及解决办法

  1. ​public key is not available​
$ sudo apt-get update
Get:1 file:/var/cuda-repo-wsl-ubuntu-11-7-local InRelease [1575 B]
Get:1 file:/var/cuda-repo-wsl-ubuntu-11-7-local InRelease [1575 B]
Get:2 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 InRelease [1581 B]
Err:2 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC

上面提示​​A4B469963BF863CC​​这个key没有,执行下面的命令即可解决

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC

参考

  • ​​https://docs.nvidia.com/cuda/wsl-user-guide/index.html​​
  • ​​https://chrisjean.com/fix-apt-get-update-the-following-signatures-couldnt-be-verified-because-the-public-key-is-not-available/​​


举报

相关推荐

0 条评论