解决E: The repository ‘file:/var/cudnn-local-repo-ubuntu2004-8.4.1.50 InRelease‘ is not signed.

解决:E: The repository ‘file:/var/cudnn-local-repo-ubuntu2004-8.4.1.50 InRelease’ is not signed.

在终端输入sudo apt update
报错

Get:1 file:/var/cudnn-local-repo-ubuntu2004-8.4.1.50  InRelease [1,575 B]
Get:1 file:/var/cudnn-local-repo-ubuntu2004-8.4.1.50  InRelease [1,575 B]
Err:1 file:/var/cudnn-local-repo-ubuntu2004-8.4.1.50  InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 15198637E3EC4A60
Hit:2 http://mirrors.ustc.edu.cn/ubuntu focal InRelease
Hit:3 http://mirrors.ustc.edu.cn/ubuntu focal-updates InRelease
Hit:4 http://mirrors.ustc.edu.cn/ubuntu focal-backports InRelease
Hit:5 http://mirrors.ustc.edu.cn/ubuntu focal-security InRelease
Reading package lists... Done
W: GPG error: file:/var/cudnn-local-repo-ubuntu2004-8.4.1.50  InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 15198637E3EC4A60
E: The repository 'file:/var/cudnn-local-repo-ubuntu2004-8.4.1.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.

有个仓库坏了,索性直接删除
打开终端,输入

cd /etc/apt/sources.list.d
rm cudnn-local-ubuntu2004-8.4.1.50.list #换成你自己错误的仓库

再次输入sudo apt update,恢复正常

Hit:1 http://mirrors.ustc.edu.cn/ubuntu focal InRelease
Hit:2 http://mirrors.ustc.edu.cn/ubuntu focal-updates InRelease
Hit:3 http://mirrors.ustc.edu.cn/ubuntu focal-backports InRelease
Hit:4 http://mirrors.ustc.edu.cn/ubuntu focal-security InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.

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