【linux GPG error】

W: GPG error: file:/var/cudnn-local-repo-ubuntu1804-8.9.6.50 InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E2E0E3C0A48BB858 E: The repository 'file:/var/cudnn-local-repo-ubuntu1804-8.9.6.50 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

这个错误表明你的系统无法验证 ‘file:/var/cudnn-local-repo-ubuntu1804-8.9.6.50 InRelease’ 仓库的公钥。你可以尝试以下步骤来解决这个问题

  1. 找到 /var 目录下对应的 cudnn* 文件夹,然后执行如下命令:
sudo cp /var/cudnn-local-repo-ubuntu1804-8.9.6.50/*.gpg /usr/share/keyrings/
sudo apt update
sudo apt upgrade
  1. 如果上述方法无效,你可以尝试删除有问题的仓库。打开终端,输入以下命令:
cd /etc/apt/sources.list.d
rm cudnn-local-ubuntu1804-8.9.6.50.list #换成你自己错误的仓库

然后再次输入 sudo apt update,看看是否恢复正常

你可能感兴趣的:(linux问题,linux,ubuntu)