树莓派更换国内源后报公钥缺失错误

树莓派更换国源后执行sudo apt update后报错:

The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 9165938D90FDDD2E
Reading package lists… Done
W: GPG error: http://mirrors.aliyun.com/raspbian/raspbian buster InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 9165938D90FDDD2E
E: The repository ‘http://mirrors.aliyun.com/raspbian/raspbian buster 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.

翻译一下是:
The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 9165938D90FDDD2E

这表示APT在尝试验证软件包的签名时,没有找到对应的公钥。APT使用公钥来确保软件包的来源是可信的,防止恶意软件包被安装。NO_PUBKEY 9165938D90FDDD2E是缺失公钥的标识符。
Reading package lists… Done

这表示APT已经完成了软件包列表的读取。
W: GPG error: http://mirrors.aliyun.com/raspbian/raspbian buster InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 9165938D90FDDD2E

这是一个警告(由W:表示),指出在使用GPG(GNU Privacy Guard,一种加密软件)进行签名验证时出现了错误。具体来说,是因为无法验证http://mirrors.aliyun.com/raspbian/raspbian源的InRelease文件的签名,原因是缺少公钥。
E: The repository ‘http://mirrors.aliyun.com/raspbian/raspbian buster InRelease’ is not signed.

这是一个错误(由E:表示),说明APT无法验证指定的软件源的签名,因为它没有被正确签名。
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.

这是一个通知,说明由于无法安全地验证软件源的签名,APT默认禁止从该源更新软件包。
N: See apt-secure(8) manpage for repository creation and user configuration details.

这是一个通知,建议用户查看apt-secure(8)的手册页,以获取有关如何安全地创建和配置软件源的详细信息。

解决方法:

执行一下命令即可
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9165938D90FDDD2E

  • 19
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

夏夜2029

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值