情况简介
在换源后使用sudo apt-get update
发现出现了报出由于没有公钥,无法验证下列签名: NO_PUBKEY
的错误,在查阅了大量的资料以后,都是使用sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys
来的导入密钥,导入成功之后就可以使用sudo apt-get update
来更新了,但是我的问题是无法导入密钥,会出现下面这样的错误
Executing: /tmp/apt-key-gpghome.kl8yx674H2/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys xxxxxxxx
gpg: 密钥 xxxxxxxxxx:“Valve Corporation <linux@steampowered.com>” 未改变
gpg: 处理的总数:1
gpg: 未改变:1
在多次查找资料接近破防的时候,最后今天终于解决了这个问题,所以就想把这个问题写一下,让后面的人一下子就可以解决,不用再像我一样打开几十个页面了。
解决方法
根据我们在使用sudo apt-get update
的报错来解决
比如说我的报错内容是
获取:1 file:/var/cudnn-local-repo-ubuntu2004-8.8.0.121 InRelease [1,572 B]
获取:1 file:/var/cudnn-local-repo-ubuntu2004-8.8.0.121 InRelease [1,572 B]
命中:2 http://mirrors.aliyun.com/docker-ce/linux/ubuntu focal InRelease
命中:3 https://dl.google.com/linux/chrome/deb stable InRelease
命中:4 http://packages.microsoft.com/repos/code stable InRelease
命中:6 https://download.docker.com/linux/ubuntu focal InRelease
命中:5 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates InRelease
命中:7 http://mirrors.aliyun.com/ubuntu bionic InRelease
命中:8 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal InRelease
命中:9 https://packages.microsoft.com/repos/edge stable InRelease
命中:10 http://mirrors.aliyun.com/ubuntu bionic-security InRelease
命中:11 http://security.ubuntu.com/ubuntu focal-security InRelease
命中:12 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu focal InRelease
命中:13 http://mirrors.aliyun.com/ubuntu bionic-updates InRelease
命中:14 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports InRelease
获取:15 https://repo.steampowered.com/steam stable InRelease [2,861 B]
命中:16 http://mirrors.aliyun.com/ubuntu bionic-backports InRelease
错误:15 https://repo.steampowered.com/steam stable InRelease
由于没有公钥,无法验证下列签名: NO_PUBKEY F24AEA9FB05498B7
忽略:17 https://repo.nordvpn.com/deb/nordvpn/debian stable InRelease
错误:18 http://typora.io linux/ InRelease
连接失败 [IP: 198.18.0.58 80]
错误:19 https://repo.nordvpn.com/deb/nordvpn/debian stable Release
Could not handshake: Error in the pull function. [IP: 198.18.0.18 443]
正在读取软件包列表... 完成
W: GPG 错误:https://repo.steampowered.com/steam stable InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY F24AEA9FB05498B7
E: 仓库 “https://repo.steampowered.com/steam stable InRelease” 没有数字签名。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
E: 仓库 “https://repo.nordvpn.com/deb/nordvpn/debian stable Release” 不再含有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
可以发现我们的没有公钥的错误是出现在https://repo.steampowered.com/steam stable InRelease
上,那我们就可以在source.list上面找到这个网址并注释掉
如果说你的source.list上面并没有这样的网址,那么就执行
cd /etc/apt/sources.list.d/
然后使用ls
,一定是可以找到和这个有关的文件的
比如我的
就可以看到steam-stable.list,那么我们就可以把其中的结果注释掉。
最后就可以成功的update啦
!!!!