更新软件包提示 W: GPG error 没有公钥,无法验证签名
warning:
这篇文章距离上次修改已过1556天,其中的内容可能已经有所变动。
今天更新NanoPi neo2 软件包的时候,突然提示GPG error
没有公钥,无法验证签名。具体报错如下:
Reading package lists... Done
W: GPG error: http://mirrors.ustc.edu.cn xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http://mirrors.ustc.edu.cn xenial-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http://mirrors.ustc.edu.cn xenial-proposed InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http://mirrors.ustc.edu.cn xenial-security InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http://mirrors.ustc.edu.cn xenial-updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
翻译过来就是GPG
错误,没有公钥,无法验证签名。
Hockeypuck OpenPGP keyserver,这个网站可以获取缺失的公钥。
命令如下(后面的40976EAF437D05B5
是你具体报错时提示缺失公钥的部分):
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5