"gpg: error reading key: No public key" when updating manjaro-keyring

I have a super weird issue which has almost been preventing me from installing/updating anything. Anytime pacman tries to update the manjaro-keyring package, I get the error in the title of this post. I have had to temporarily disable GPG checking in my pacman.conf, and I know this is not really an ideal security situation. Are there any known issues with the formatting on the GPG keys?

I’m running gnupg 2.2.29-1 and I’ve made sure to stay on the stable branch while the issue persists. I was on unstable but force downgraded everything. Rebooted and reregistered keys many times in multiple orders. I’m totally at a loss.

I’ve visited Manjaro’s help site and every Manjaro forum page that even mentions GPG. Suggestions from there unfortunately did nothing to help.

To be specific, on step 4: sudo pacman-key --populate archlinux manjaro

When it tries to append manjaro.gpg keys, I get the “No public key” error twice in a row, then the rest seems to continue normally. I tried continuing anyway, but when I re-enable key checking and run sudo pacman -Syu I get the following:

error: GPGME error: No data
error: GPGME error: No data
error: GPGME error: No data
error: GPGME error: No data
:: Synchronizing package databases...
 core                 171.2 KiB  32.2 KiB/s 00:05 [#####################################################################] 100%
 extra               1900.0 KiB  6.27 MiB/s 00:00 [#####################################################################] 100%
 community              6.7 MiB  8.44 MiB/s 00:01 [#####################################################################] 100%
 multilib             175.7 KiB  2.86 MiB/s 00:00 [#####################################################################] 100%
error: GPGME error: No data
error: GPGME error: No data
error: GPGME error: No data
error: GPGME error: No data
error: failed to synchronize all databases (invalid or corrupted database (PGP signature))

And you also tried:

sudo rm -R /var/lib/pacman/sync

sudo pacman-mirrors -f5 && pacman -Syyu

and it did not work?

3 Likes
2 Likes

It must have been that exact directory that was causing issues. How did I not come across this solution over the course of looking at anything else? Dunno, but thank you!

2 Likes

Actually it took me a couple of minutes to decide if i post it or not, because is a bit extreme, but since you mentioned

i thought it as last resort. Glad it helped and nothing else went wrong :+1:

2 Likes

Hey, so for whatever reason the problem started back up like 4 hours later. I have no idea what I could have done to cause it. I’m gonna try @freggel.doe’s method to see if it helps at all. I’ll report back later with more info.

What are you updating at 4 hours intervals ? Or do you get that error when now you try to install software ?

I now get the error when installing packages unless I edit pacman.conf to set SigLevel = Required DatabaseNever.