GPG 错误:http://archive.ubuntu.com/ubuntu jammy InRelease:无法验证以下签名,因为公钥不可用

GPG 错误:http://archive.ubuntu.com/ubuntu jammy InRelease:无法验证以下签名,因为公钥不可用

请问我能否获得一些解决以下问题的指导?

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. 
GPG error: https://pkg.osquerypackages.com/deb deb
InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 97A80C63C9D8B80B
enter code here

Ubuntu 版本是 22.04,我使用的说明或命令是:

sudo gpg --recv-keys 871920D1991BC93C
sudo apt update

sudo-apt-cache 策略中的一些内容

00 http://gb.archive.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages
     release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=restricted,b=amd64
     origin gb.archive.ubuntu.com
 500 http://gb.archive.ubuntu.com/ubuntu jammy-security/main i386 Packages
     release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=main,b=i386
     origin gb.archive.ubuntu.com
 500 http://gb.archive.ubuntu.com/ubuntu jammy-security/main amd64 Packages
     release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=main,b=amd64
     origin gb.archive.ubuntu.com
 100 http://gb.archive.ubuntu.com/ubuntu jammy-backports/universe i386 Packages
     release v=22.04,o=Ubuntu,a=jammy-backports,n=jammy,l=Ubuntu,c=universe,b=i386
     origin gb.archive.ubuntu.com
 100 http://gb.archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages
     release v=22.04,o=Ubuntu,a=jammy-backports,n=jammy,l=Ubuntu,c=universe,b=amd64

答案1

好的,看起来您可能正在遵循旧版本 Ubuntu 或旧版本软件的说明。

我通过阅读找到了当前版本的安装说明此处的文档提供了一个链接下载页面

在下载页面底部,我点击了Debian Linux在下面备选安装选项显示添加存储库所需的命令。Ubuntu 基于 Debian Linux,两者都使用相同的基于“apt”或“deb”的包管理器,因此 Debian 应该相当于 Ubuntu。

但首先,您需要从源列表中删除现有的存储库,因此请运行以下命令:

sudo sed -i '/osquerypackages/d' /etc/apt/sources.list
sudo sed -i '/osquerypackages/d' /etc/apt/sources.list.d/*

然后,只需按照说明操作即可:

sudo mkdir -p /etc/apt/keyrings
curl -L https://pkg.osquery.io/deb/pubkey.gpg | sudo tee /etc/apt/keyrings/osquery.asc
sudo add-apt-repository 'deb [arch=amd64 signed-by=/etc/apt/keyrings/osquery.asc] https://pkg.osquery.io/deb deb main'
sudo apt install osquery

相关内容