6

please I need help. I tried to install osquery on my Ubuntu and this is what I am getting:

Err:5 http://gb.archive.ubuntu.com/ubuntu jammy InRelease                      
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C
Err:9 https://ppa.launchpadcontent.net/jonathonf/vim/ubuntu jammy InRelease    
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8CF63AD3F06FC659
Get:1 https://osquery-packages.s3.us-east-1.amazonaws.com/deb deb InRelease [69.9 kB]
Err:8 http://gb.archive.ubuntu.com/ubuntu jammy-updates InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C
Err:11 http://gb.archive.ubuntu.com/ubuntu jammy-backports InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C
Err:12 http://gb.archive.ubuntu.com/ubuntu jammy-security InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C
Err:1 https://osquery-packages.s3.us-east-1.amazonaws.com/deb deb InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 97A80C63C9D8B80B

I have tried removing the keys but I keep getting this. I will really appreciate it.

1
  • If you solve the problem, please share the solution.
    – Cloud Cho
    Commented Jul 17 at 23:27

1 Answer 1

13

Try

$> gpg --keyserver keyserver.ubuntu.com --recv-keys 871920D1991BC93C  

And then

$> gpg --export --armor 871920D1991BC93C | sudo apt-key add - && sudo apt-get update 

Repeat for each of your missing keys - you seem to have several.

Edit:

After version 22.04 apt-key is apparently deprecated

From the manpages

   If your existing use of apt-key add looks like this:

   wget -qO- https://myrepo.example/myrepo.asc | sudo apt-key add -

   Then you can directly replace this with the following (though note the recommendation
   below):

   wget -qO- https://myrepo.example/myrepo.asc | sudo tee
   /etc/apt/trusted.gpg.d/myrepo.asc
9
  • Note that traditional apt-key add functionality is considered 'deprecated' nowadays.
    – Thomas Ward
    Commented Aug 30, 2023 at 18:36
  • Thank you so much for your reply. After I entered the second command, this is what I got. -Lenovo-IdeaPad-S340-14API:/etc/apt/sources.list.d# $> gpg --export --armor 871920D1991BC93C | sudo apt-key add - && sudo apt-get update Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)). $: command not found gpg: no valid OpenPGP data found. Commented Aug 30, 2023 at 18:47
  • Following up on @ThomasWard comment. See the man page for apt-key here. I have updated my answer Commented Aug 30, 2023 at 18:52
  • Hey Nikolaj thank you for your post. Am just abit stuck. So where it says myrepo.example, do I put the repository name? For example I am trying to install osquery and this is how all these began, Commented Aug 30, 2023 at 19:00
  • 1
    So remove one of them? Btw this is a seperate issue from the original post about missing public keys for your repository entries. Commented Aug 30, 2023 at 19:32

Not the answer you're looking for? Browse other questions tagged .