"GPGME error: No data" running pacman

SUPPORT | SOLVED

Hi, I'm having an issue updating my Arch installation.

A few weeks ago I checked the list of updates and when it asked Y or N to continue I selected N.

The day after I wanted to run the updates but got the following error:

user@ranger  /var/lib/pacman  sudo pacman -Syu
error: GPGME error: No data
error: GPGME error: No data
error: GPGME error: No data
:: Synchronizing package databases...
 core                                                                                                         155,6 KiB  1377 KiB/s 00:00 [####################################################################################] 100%
 extra                                                                                                       1747,5 KiB  5,69 MiB/s 00:00 [####################################################################################] 100%
 community is up to date
 multilib                                                                                                     163,3 KiB  4,69 MiB/s 00:00 [####################################################################################] 100%
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))

I have tried a suggestion that is commonly posted to these questions, for example here. The suggestion says to remove /var/lib/pacman/sync. When I remove this folder pacman (pacman -Syyu after removing the folder) works again without error, but there are no updates. The output has been the same since I removed the sync folder:

:: Starting full system upgrade...
 there is nothing to do

I don't think there have been zero updates on any of the packages I have installed over the past weeks, so I'm suspicious of this output. I have now restored the old sync folder in the hopes of finding a solution. What can I try?

I have checked the mirrorlist, but I only have a 2 mirrors uncommented, and I have tried to update the archlinux-keyring, as the error relates to PGP signatures, but that also fails:

user@ranger  /var/lib/pacman  sudo pacman -Sy archlinux-keyring
error: GPGME error: No data
error: GPGME error: No data
error: GPGME error: No data
:: Synchronizing package databases...
 core                                                                                                         155,6 KiB  1330 KiB/s 00:00 [####################################################################################] 100%
 extra                                                                                                       1747,5 KiB  4,56 MiB/s 00:00 [####################################################################################] 100%
 community is up to date
 multilib                                                                                                     163,3 KiB  4,83 MiB/s 00:00 [####################################################################################] 100%
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))

When I try to update the archlinux-keyring manually I get the following output:

user@ranger  ~  sudo pacman -U archlinux-keyring-20230320-1-any.pkg.tar.zst
error: GPGME error: No data
error: GPGME error: No data
error: GPGME error: No data
error: database 'core' is not valid (invalid or corrupted database (PGP signature))
error: database 'extra' is not valid (invalid or corrupted database (PGP signature))
error: database 'multilib' is not valid (invalid or corrupted database (PGP signature))
loading packages...
error: failed to prepare transaction (invalid or corrupted database)

edit: I have redone these steps, and for some reason this time they worked:

sudo rm -rf /var/lib/pacman/sync/
sudo pacman-key --init
sudo pacman-key --refresh-keys
sudo pacman-key --populate
sudo pacman -Syyu

I have 662 packages to update now.

Posted Mar 26, 2023, 12:04 PM UTC · edited

17
TheNextPoetician•

Right. Manjaro. Figures. Also: Rule #1.

2
ZeStig2409•

How do you say OP is using Manjaro?

2
InFerYesOP•

My populate command at the end mentioned manjaro, because I found the order of steps on the Manjaro forums.

1
TheNextPoetician•

I see. That was unclear at best. It's always a good day to do housekeeping. :)

2
TheNextPoetician•

sudo pacman-key --populate archlinux manjaro This was there before a refresh. Now it's gone. Oh well ...

1
InFerYesOP•

I'm not using Manjaro. I copied too much, trimmed it to just --populate.

 user@ranger  /var/lib/pacman  sudo pacman-key --populate       
==> Appending keys from archlinux.gpg...
gpg: public key DB323392796CA067 is 3037 days newer than the signature
==> Updating trust database...
gpg: next trustdb check due at 2023-07-12
1
LtDkAngel•

Had a few similar issues with pacman best soluttion I found so far is to use any other package manager!

-2