Nvidia GPG错误 由于公钥不可用,无法验证以下签名:NO_PUBKEY

尝试更新CUDA时出现了此错误。
Err:1 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64  InRelease            
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC

W: GPG error: https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 InRelease:
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC 
E: The repository 'https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 InRelease' is not signed. 
N: Updating from such a repository can't be done securely, and is therefore disabled by default. 
N: See apt-secure(8) manpage for repository creation and user configuration details.
1个回答

解决方法如下:
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub

sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub

你在哪里找到这些网址的? - DrMcCleod
如果您的基础镜像是Ubuntu 18,那么在执行apt-get update之前,添加这两个RUN语句可以解决问题。对于使用TensorFlow官方Docker镜像构建的情况非常有用,可以修复这些问题。 - undefined