树莓派apt公钥错误解决方案

今天试着玩了一天esp8266,发现要是只是想试一下模块通信的话需要重刷程序,flash毕竟会磨损,要是总这样造也稍微有点心疼,最主要是编译烧写太费时间。于是想到用树莓派。烧完程序打算换源的时候遇到了apt update报错。

W: GPG error: http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian bullseye InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY [一串密钥a]

E: The repository 'http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian bullseye InRelease' is not signed.

解决方法(网上找的)

先输入:gpg --keyserver keyserver.ubuntu.com --recv-keys [刚才那一串密钥a]

然后输入:gpg --export --armor [刚才那一串密钥a] | sudo apt-key add -

总结

密钥可能有几个,一个一个的替换、输入。


树莓派apt公钥错误解决方案
https://zhaosn.github.io/2022/rpi-pubkeyErr/
作者
Zhao SN
发布于
2022年3月12日
更新于
2022年10月28日
许可协议