Raspberry Pi solves "The following signatures cannot be verified because there is no public key"

"The following signatures cannot be verified because there is no public key" when the Raspberry Pi solves the problem of changing the source

Reason for changing the source: the default source is too slow, and I want to change to the source of the open source software mirror station of Tsinghua University

method

Refer to Raspbian mirror use help | Tsinghua University open source software mirror site (click here to view)
and then use sudo apt-get updatethe command to update the software source list and check it.


question

Only run after following this methodsudo apt-get update

root@pi:~ $ sudo apt-get update
获取:1 http://....../raspbian bullseye InRelease [15.0 kB]
获取:2 http://....../raspberrypi bullseye InRelease [23.7 kB]
错误:1 http://....../raspbian bullseye InRelease
  由于没有公钥,无法验证下列签名: NO_PUBKEY XXXXXXXXXXXXXXXX
正在读取软件包列表... 完成          
W: GPG 错误:http://mirrors......raspbian bullseye InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY XXXXXXXXXXXXXXXX
E: 仓库 “http://....../raspbian bullseye InRelease” 没有数字签名。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
......
root@pi:~ $ 

Terminal 1
"The following signatures cannot be verified because there is no public key"


Cause Analysis:

No public key imported

solution:

Solve by running
gpg --keyserver keyserver.ubuntu.com --recv-keys [提示的公钥]
and
gpg --export --armor [提示的公钥] | sudo apt-key add -

Terminal 2
Finally don't forgetsudo apt-get update

Guess you like

Origin blog.csdn.net/linux_rm/article/details/124051916