# Update failed : PGP keys cannot be imported

**URL:** <https://rebornos.discourse.group/t/update-failed-pgp-keys-cannot-be-imported/958>\
**Category:** Xfce\
**Created:** [February 14, 2023, 5:46am UTC](https://rebornos.discourse.group/t/update-failed-pgp-keys-cannot-be-imported/958 "2023-02-14T05:46:44Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbich](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@mbich](https://rebornos.discourse.group/u/mbich)\
**Post date:** [February 14, 2023, 5:46am UTC](https://rebornos.discourse.group/t/update-failed-pgp-keys-cannot-be-imported/958/1 "2023-02-14T05:46:44Z")

</div>

```auto
Benötigte Schlüssel werden heruntergeladen …
:: PGP Schlüssel E5BB298470AD4E41, »Sébastien Luttringer <seblu@seblu.net>« importieren? [J/n] 
Fehler: Schlüssel "E5BB298470AD4E41" konnte nicht entfernt abgerufen werden
:: PGP Schlüssel 94657AB20F2A092B, »Andreas Radke <andyrtr@archlinux.org>« importieren? [J/n] 
Fehler: Schlüssel "94657AB20F2A092B" konnte nicht entfernt abgerufen werden
:: PGP Schlüssel 771DF6627EDF681F, »Tobias Powalowski <tpowa@archlinux.org>« importieren? [J/n]

```

Until last night everything worked. Now suddenly “pacman -Syu” fails.  
I already ran “Refresh Mirrors” twice.  
What can I do now ?

---

<div class="post-metadata">

**Author:** ![CookieSource](https://yyz2.discourse-cdn.com/free1/user_avatar/rebornos.discourse.group/cookiesource/32/16_2.png) [@CookieSource](https://rebornos.discourse.group/u/CookieSource)\
**Post date:** [February 14, 2023, 7:17am UTC](https://rebornos.discourse.group/t/update-failed-pgp-keys-cannot-be-imported/958/2 "2023-02-14T07:17:33Z")

</div>

Hi reinstalling the arch Linux keyring should fix this issue.

`pacman -Sy archlinux-keyring`

Let me know if that works for you.

---

<div class="post-metadata">

**Author:** ![mbich](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@mbich](https://rebornos.discourse.group/u/mbich)\
**Post date:** [February 14, 2023, 7:22am UTC](https://rebornos.discourse.group/t/update-failed-pgp-keys-cannot-be-imported/958/3 "2023-02-14T07:22:43Z")

</div>

Thank you, CookieAlice.  
Unfortunately it didn’t work.

```auto
franz@ros-xfce ~ [1]> sudo pacman -Sy archlinux-keyring
:: Paketdatenbanken werden synchronisiert …
 Reborn-OS ist aktuell
 core ist aktuell
 extra ist aktuell
 community ist aktuell
 multilib ist aktuell
Warnung: archlinux-keyring-20230130-1 ist aktuell -- Reinstalliere
Abhängigkeiten werden aufgelöst …
Nach in Konflikt stehenden Paketen wird gesucht …

Pakete (1) archlinux-keyring-20230130-1

Gesamtgröße des Downloads: 1,12 MiB
Gesamtgröße der installierten Pakete: 1,60 MiB
Größendifferenz der Aktualisierung: 0,00 MiB

:: Installation fortsetzen? [J/n] J
:: Pakete werden empfangen …
 archlinux-keyrin... 1150,2 KiB 156 KiB/s 00:07 [######################] 100%
(1/1) Schlüssel im Schlüsselbund werden geprüft [######################] 100%
(1/1) Paket-Integrität wird überprüft [######################] 100%
Fehler: archlinux-keyring: signature from "Christian Hesse <eworm@archlinux.org>" is unknown trust
:: Datei /var/cache/pacman/pkg/archlinux-keyring-20230130-1-any.pkg.tar.zst ist beschädigt (Ungültiges oder beschädigtes Paket (PGP-Signatur)).
Soll die Datei entfernt werden? [J/n] n
Fehler: Der Vorgang konnte nicht durchgeführt werden (Ungültiges oder beschädigtes Paket (PGP-Signatur))
Fehler sind aufgetreten, keine Pakete wurden aktualisiert.
franz@ros-xfce ~ [1]>

```

In another attempt I answered the last question (removing the file ?) with Yes, but the error-message was identical.

---

<div class="post-metadata">

**Author:** ![CookieSource](https://yyz2.discourse-cdn.com/free1/user_avatar/rebornos.discourse.group/cookiesource/32/16_2.png) [@CookieSource](https://rebornos.discourse.group/u/CookieSource)\
**Post date:** [February 14, 2023, 7:34am UTC](https://rebornos.discourse.group/t/update-failed-pgp-keys-cannot-be-imported/958/4 "2023-02-14T07:34:09Z")

</div>

Can you try

`sudo pacman-key --refresh-keys`

Otherwise we can disable the check and do the update that way

---

<div class="post-metadata">

**Author:** ![mbich](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@mbich](https://rebornos.discourse.group/u/mbich)\
**Post date:** [February 14, 2023, 7:38am UTC](https://rebornos.discourse.group/t/update-failed-pgp-keys-cannot-be-imported/958/5 "2023-02-14T07:38:24Z")

</div>

It didn’t work.  
I cannot copy and paste the error-messages, it doesn’t work and I don’t know why it did before and now it doesn’t.

It says: gpg: keydb\_search failed: Ungültiges Paket  
gpg: (don’t know): invalid packet /(ctb=00)

Then it says: keyring\_get\_keyblock: read error: Ungültiges Paket  
gpg: keyring\_get keyblock failed: Ungültiger Schlüsselbund  
gpg: Schlüsselbund\_Cache konnte nicht neu erzeugt werden: Ungültiger Schlüsselbund  
gpg: marginals needed: 3 completes needed: 1 trust model: pgp

---

<div class="post-metadata">

**Author:** ![CookieSource](https://yyz2.discourse-cdn.com/free1/user_avatar/rebornos.discourse.group/cookiesource/32/16_2.png) [@CookieSource](https://rebornos.discourse.group/u/CookieSource)\
**Post date:** [February 14, 2023, 7:46am UTC](https://rebornos.discourse.group/t/update-failed-pgp-keys-cannot-be-imported/958/6 "2023-02-14T07:46:05Z")

</div>

No problem let us temporarily disable the check completely.

`sudo nano /etc/pacman.conf` or your preferred text editor

Then scroll down until you see SigLevel

If it has an # before it remove it and change

Packagerequired databasenever

To Never

Then press control x and then y and finally press enter

If you use nano.

Then try to update

---

<div class="post-metadata">

**Author:** ![mbich](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@mbich](https://rebornos.discourse.group/u/mbich)\
**Post date:** [February 14, 2023, 7:56am UTC](https://rebornos.discourse.group/t/update-failed-pgp-keys-cannot-be-imported/958/7 "2023-02-14T07:56:57Z")

</div>

Thank you very much. This worked.

---

<div class="post-metadata">

**Author:** ![CookieSource](https://yyz2.discourse-cdn.com/free1/user_avatar/rebornos.discourse.group/cookiesource/32/16_2.png) [@CookieSource](https://rebornos.discourse.group/u/CookieSource)\
**Post date:** [February 14, 2023, 8:03am UTC](https://rebornos.discourse.group/t/update-failed-pgp-keys-cannot-be-imported/958/8 "2023-02-14T08:03:17Z")

</div>

Excellent I would recommend that you put the old default back though.  
For security reasons 😃

`PackageRequired DatabaseNeverl`

---

<div class="post-metadata">

**Author:** ![mbich](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@mbich](https://rebornos.discourse.group/u/mbich)\
**Post date:** [February 14, 2023, 2:25pm UTC](https://rebornos.discourse.group/t/update-failed-pgp-keys-cannot-be-imported/958/9 "2023-02-14T14:25:57Z")

</div>

I am sorry to tell you that the problem still exists when the old default is active.  
I tried to install the package catfish and I am getting:

```auto
Benötigte Schlüssel werden heruntergeladen …
:: PGP Schlüssel 786C63F330D7CB92, »Felix Yan <felixonmars@archlinux.org>« importieren? [J/n] 
Fehler: Schlüssel "786C63F330D7CB92" konnte nicht entfernt abgerufen werden

```

Is there a magic event which will happen in the future (nobody knowing when and why) and then the problem is gone ?  
Or should I reinstall RebornOS to get rid of the problem ?

---

<div class="post-metadata">

**Author:** ![SoulHarsh0071](https://yyz2.discourse-cdn.com/free1/user_avatar/rebornos.discourse.group/soulharsh0071/32/700_2.png) [@SoulHarsh0071](https://rebornos.discourse.group/u/SoulHarsh0071)\
**Post date:** [February 14, 2023, 2:30pm UTC](https://rebornos.discourse.group/t/update-failed-pgp-keys-cannot-be-imported/958/10 "2023-02-14T14:30:37Z")

</div>

Hey!  
You do not need to re-install in order to resolve this issue. Instead, run the following commands to get a fresh copy of keys:

```plaintext
sudo pacman-key --init
sudo pacman-key --populate

```

You might have to reinstall the RebornOS keyring to avoid issues with it as well:

```plaintext
sudo pacman -S rebornos-keyring

```

Let me know if that helps!

EDIT: Please, note that you might see some error messages, these are common, and can be ignored. You can use our privatebin instance and paste the output there and share the URL to it.  
URL to privatebin instance: [https://paste.rebornos.org/](https://paste.rebornos.org/)

Cheers,  
SoulHarsh007

---

<div class="post-metadata">

**Author:** ![mbich](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@mbich](https://rebornos.discourse.group/u/mbich)\
**Post date:** [February 14, 2023, 2:33pm UTC](https://rebornos.discourse.group/t/update-failed-pgp-keys-cannot-be-imported/958/11 "2023-02-14T14:33:35Z")

</div>

Thank you, SoulHarsh0071,  
the first command “sudo pacman-key --init” got me tons of error-messages.  
I am copying only the end of them because somehow the repeat only.

> Blockzitat  
> gpg: keyring\_get\_keyblock failed: Ungültiger Schlüsselbund  
> gpg: Schlüsselbund-Cache konnte nicht neu erzeugt werden: Ungültiger Schlüsselbund  
> gpg: marginals needed: 3 completes needed: 1 trust model: pgp  
> gpg: [don’t know]: invalid packet (ctb=00)  
> gpg: keyring\_get\_keyblock: read error: Ungültiges Paket  
> gpg: keydb\_get\_keyblock failed: Ungültiger Schlüsselbund  
> gpg: validate\_key\_list failed  
> gpg: [don’t know]: invalid packet (ctb=00)  
> gpg: keyring\_get\_keyblock: read error: Ungültiges Paket  
> gpg: keydb\_get\_keyblock failed: Ungültiger Schlüsselbund

> Blockzitat

---

<div class="post-metadata">

**Author:** ![mbich](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@mbich](https://rebornos.discourse.group/u/mbich)\
**Post date:** [February 14, 2023, 2:35pm UTC](https://rebornos.discourse.group/t/update-failed-pgp-keys-cannot-be-imported/958/12 "2023-02-14T14:35:26Z")

</div>

The second command with “populate” failed too.

> Blockzitat  
> gpg: keydb\_get\_keyblock failed: Ungültiger Schlüsselbund  
> gpg: validate\_key\_list failed  
> gpg: [don’t know]: invalid packet (ctb=00)  
> gpg: keydb\_search failed: Ungültiges Paket  
> gpg: error reading key: Ungültiges Paket  
> ==\> Signiere die vertrauenswürdigen Schlüssel im Schlüsselbund lokal…  
> ==\> FEHLER: 0311C418E0EC1E68B69AA32A4833909AF8E40823 konnte nicht lokal signiert werden.  
> ==\> FEHLER: E1F82735113AB192AA3DE1B1BF0740F967BA439D konnte nicht lokal signiert werden.  
> ==\> FEHLER: 75BD80E4D834509F6E740257B1B73B02CC52A02A konnte nicht lokal signiert werden.  
> ==\> FEHLER: 38D3F838D6A0A3AB32DDDF2299EABCFB664B3E5F konnte nicht lokal signiert werden.  
> ==\> FEHLER: 2DD26266ABFEDBE49E7B7D330218E21BB4BC1E95 konnte nicht lokal signiert werden.  
> ==\> FEHLER: 69E6471E3AE065297529832E6BA0F5A2037F4F41 konnte nicht lokal signiert werden.  
> ==\> FEHLER: 2F6D8657D79199892002E6465F819C731E28BDAE konnte nicht lokal signiert werden.  
> ==\> FEHLER: 634862E57AB72263FB556DC92A54E5AA978177B3 konnte nicht lokal signiert werden.  
> ==\> FEHLER: D8AFDDA07A5B6EDFA7D8CCDAD6D055F927843F1C konnte nicht lokal signiert werden.  
> ==\> FEHLER: 91FFE0700E80619CEB73235CA88E23E377514E00 konnte nicht lokal signiert werden.

> Blockzitat

---

<div class="post-metadata">

**Author:** ![mbich](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@mbich](https://rebornos.discourse.group/u/mbich)\
**Post date:** [February 14, 2023, 2:38pm UTC](https://rebornos.discourse.group/t/update-failed-pgp-keys-cannot-be-imported/958/13 "2023-02-14T14:38:11Z")

</div>

I think I will delete the Xfce and make a clean install with LXDE-desktop.  
There seems to be no solution for the problem and somehow I have the impression that I am the only one who has this problem.

---

<div class="post-metadata">

**Author:** ![SoulHarsh0071](https://yyz2.discourse-cdn.com/free1/user_avatar/rebornos.discourse.group/soulharsh0071/32/700_2.png) [@SoulHarsh0071](https://rebornos.discourse.group/u/SoulHarsh0071)\
**Post date:** [February 14, 2023, 2:42pm UTC](https://rebornos.discourse.group/t/update-failed-pgp-keys-cannot-be-imported/958/14 "2023-02-14T14:42:49Z")

</div>

Hello,

There are a few reasons for this to occur I can guide you with general troubleshooting steps, this will avoid re-installation. But, if you really want to re-install, it’s your call.

General troubleshooting steps:

1. Change keyserver to Ubuntu keyserver:

- Edit: `/etc/pacman.d/gnupg/gpg.conf` and find keyserver directive, change it to: “keyserver hkp://keyserver.ubuntu.com”

1. Check system clock, this is common issue for incorrect key issues:

- Execute this command: `timedatectl set-ntp true`
- Restart systemd-timesynced to ensure if the above command worked correctly: `sudo systemctl restart systemd-timesyncd.service`

Cheers,  
SoulHarsh007

---

<div class="post-metadata">

**Author:** ![mbich](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@mbich](https://rebornos.discourse.group/u/mbich)\
**Post date:** [February 14, 2023, 2:52pm UTC](https://rebornos.discourse.group/t/update-failed-pgp-keys-cannot-be-imported/958/15 "2023-02-14T14:52:49Z")

</div>

Thank you SoulHarsh0071,  
I did all commands, but the problem remains.  
Now I will make a new install of RebornOS.

---

<div class="post-metadata">

**Author:** ![shivanandvp](https://yyz2.discourse-cdn.com/free1/user_avatar/rebornos.discourse.group/shivanandvp/32/10_2.png) [@shivanandvp](https://rebornos.discourse.group/u/shivanandvp)\
**Post date:** [February 14, 2023, 3:35pm UTC](https://rebornos.discourse.group/t/update-failed-pgp-keys-cannot-be-imported/958/16 "2023-02-14T15:35:31Z")

</div>

Hi @mbich ,

1. It helps to prefix `LANG=C` while you are running commands so that the output is in English for us to see

2. Sometimes one needs to delete the pacman sync directory to fix errors.

```plaintext
LANG=C sudo rm -r /var/lib/pacman/sync

LANG=C sudo refresh-mirrors

LANG=C sudo pacman -Syy archlinux-keyring rebornos-keyring

LANG=C sudo pacman -Syu

```

1. If you can come to our [Discord](https://rebornos.org/discord), your issue can be resolved quicker

---

<div class="post-metadata">

**Author:** ![mbich](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@mbich](https://rebornos.discourse.group/u/mbich)\
**Post date:** [February 14, 2023, 4:19pm UTC](https://rebornos.discourse.group/t/update-failed-pgp-keys-cannot-be-imported/958/17 "2023-02-14T16:19:02Z")

</div>

Hello shivanandvp,  
I am in the new LXDE installation now.  
Thanks for the suggestions. Maybe they are needed in the future.

I am in Discord now. (username “berliner”)
