3

i have a librem14 running pureos, i keep getting error running apt-get update

librem14@PureOS:~$ sudo apt update  
An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://repo.ivpn.net/stable/debian ./generic InRelease: Unknown error executing apt-key
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://brave-browser-apt-release.s3.brave.com stable InRelease: Unknown error executing apt-key
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://repo.pureos.net/pureos byzantium InRelease: Unknown error executing apt-key
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://repo.pureos.net/pureos byzantium-updates InRelease: Unknown error executing apt-key
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://repo.pureos.net/pureos byzantium-security InRelease: Unknown error executing apt-key

anybody know the solution?

telcoM
  • 87,318
  • 3
  • 112
  • 232
Jason221
  • 31
  • 1
  • 1
  • 2

4 Answers4

0

Use sudo apt-key list to list the keys.

Find these keys and delete them with sudo apt-key del <key>

Use apt-get update to finish the clean.

SlowHusky
  • 1
  • 1
0

This can happen when you add a repository, and you forget to add its public key, or maybe there was a temporary key server error when trying to import the GPG key.

1. Missing one key

If you're only missing one public GPG repository key

sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys THE_MISSING_KEY_HERE

Replace THE_MISSING_KEY_HERE with the missing GPG key.

2. Batch import all missing GPG keys.

When you're missing multiple public OpenPGP keys you can use a this one-liner to import all of them in one go:

`sudo apt update 2>&1 1>/dev/null | sed -ne 's/.*NO_PUBKEY //p' | while read key; do if ! [[ ${keys[*]} =~ "$key" ]]; then sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys "$key"; keys+=("$key"); fi; done`

The command runs sudo apt update to update your software sources and detect missing GPG keys, and it imports each missing key using hkp://pool.sks-keyservers.net:80 as its server. This server is synchronized with many other servers continuously, so it should have updated keys. You could use some other server if you wish.

The command also uses an array to store missing GPG keys for which we've already imported the key. Without that, the key import command would run twice for each missing key.

Deleting the Keys

Use below command to find and list your keys

sudo apt-key list

Use the below command to delete the key

sudo apt-key del <your-key-from-command-above>

or (Ubuntu)

sudo add-apt-repository --remove ppa:whatever/ppa

You can also remove repositories at the software center settings.


Then run the below to clean and update repositories
apt-get clean
apt-get autoclean
apt-get update

Reference https://www.linuxuprising.com/2019/06/fix-missing-gpg-key-apt-repository.html#:~:text=You%20might%20see%20a%20missing,to%20import%20the%20GPG%20key.

David Kariuki
  • 777
  • 5
  • 23
0

Try sudo ldconfig /usr/bin/gpg. See: https://unix.stackexchange.com/a/677711/114401

It worked for me. sudo apt update now works again.

Gabriel Staples
  • 2,192
  • 1
  • 24
  • 31
-4

try factorial resetting linux and or just reinstall PureOs from there website and download it on a bootable usb then boot your computer with the usb pureos download website

  • 4
    Reinstalling should be the last option if everything else fails. While your answer would probably provide a solution to the asked problem, it would definitely be the most time consuming and worst solution. – mashuptwice Mar 18 '22 at 18:41