Can't update (error refreshing databases)

While trying to update the system, I’m always getting the following error:

$ yay
error: GPGME error: No data
error: kernel-lts: missing required signature
:: Synchronizing package databases...
 endeavouros is up to date
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
 kernel-lts                                                                2,1 KiB   418   B/s 00:05 [------------------------------------------------------------] 100%
error: GPGME error: No data
error: kernel-lts: missing required signature
error: failed to synchronize all databases (invalid or corrupted database (PGP signature))
 -> error refreshing databases - exit status 1

I’ve been searching, but couldn’t find any solution so far. Any help?

Remove the sync files and try again:

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

After that:

$ sudo pacman -Syu

This doesn’t look like it has the database lck? Probably just try updating your mirrors first. Then run an update and see.

Thanks for your input. But this doesn’t seem to work, resulting in the following error:

$ sudo pacman -Syu
:: Synchronizing package databases...
 endeavouros                                                              25,9 KiB  83,5 KiB/s 00:00 [------------------------------------------------------------] 100%
 core                                                                    132,0 KiB   257 KiB/s 00:01 [------------------------------------------------------------] 100%
 extra                                                                     8,3 MiB  4,08 MiB/s 00:02 [------------------------------------------------------------] 100%
 community                                                                45,0   B   100   B/s 00:00 [------------------------------------------------------------] 100%
 multilib                                                                143,1 KiB   292 KiB/s 00:00 [------------------------------------------------------------] 100%
 kernel-lts                                                                2,1 KiB   130   B/s 00:17 [------------------------------------------------------------] 100%
error: GPGME error: No data
error: kernel-lts: missing required signature
error: failed to synchronize all databases (invalid or corrupted database (PGP signature))

Via the Welcome-dialog, I’ve changed the mirrors already a couple of times to different countries, but this didn’t bring any solution either.

I’ve tried this post as well (and changed “pacman-key --populate archlinux32” to “pacman-key --populate endeavouros”): https://ostechnix.com/solve-error-required-key-missing-from-keyring-in-arch-linux/
But without any result solving the issue. Also the following link didn’t bring me any solution: Can't update, "error: failed to synchronize all databases"

Try the following:

sudo cp -f "/etc/pacman.conf" "/etc/pacman.conf.orig"
sudo sed -i 's/SigLevel.*/SigLevel = Never/' /etc/pacman.conf
sudo pacman -Syy gnupg archlinux-keyring endeavouros-keyring
sudo mv -f "/etc/pacman.conf.orig" "/etc/pacman.conf"
sudo pacman -Syu

Hopefully it will work.

Thanks for your feedback! I’ve executed the commands one-by-one. But this didn’t bring me the solution.

Result of executing the command for the keyrings:

$ sudo pacman -Syy gnupg archlinux-keyring endeavouros-keyring
:: Synchronizing package databases...
 endeavouros                                                              25,9 KiB   227 KiB/s 00:00 [------------------------------------------------------------] 100%
 core                                                                    132,0 KiB   680 KiB/s 00:00 [------------------------------------------------------------] 100%
 extra                                                                     8,3 MiB  10,8 MiB/s 00:01 [------------------------------------------------------------] 100%
 community                                                                45,0   B   394   B/s 00:00 [------------------------------------------------------------] 100%
 multilib                                                                143,1 KiB   795 KiB/s 00:00 [------------------------------------------------------------] 100%
 kernel-lts                                                                2,1 KiB  1146   B/s 00:02 [------------------------------------------------------------] 100%
warning: gnupg-2.2.41-1 is up to date -- reinstalling
warning: archlinux-keyring-20230704-1 is up to date -- reinstalling
warning: endeavouros-keyring-20230523-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Package (3)                      Old Version  New Version  Net Change

core/archlinux-keyring           20230704-1   20230704-1     0,00 MiB
endeavouros/endeavouros-keyring  20230523-1   20230523-1     0,00 MiB
core/gnupg                       2.2.41-1     2.2.41-1       0,00 MiB

Total Installed Size:  10,20 MiB
Net Upgrade Size:       0,00 MiB

:: Proceed with installation? [Y/n] y
(3/3) checking keys in keyring                                                                       [------------------------------------------------------------] 100%
(3/3) checking package integrity                                                                     [------------------------------------------------------------] 100%
(3/3) loading package files                                                                          [------------------------------------------------------------] 100%
(3/3) checking for file conflicts                                                                    [------------------------------------------------------------] 100%
:: Processing package changes...
(1/3) reinstalling gnupg                                                                             [------------------------------------------------------------] 100%
(2/3) reinstalling archlinux-keyring                                                                 [------------------------------------------------------------] 100%
==> 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-10-27
==> Updating trust database...
gpg: next trustdb check due at 2023-10-27
(3/3) reinstalling endeavouros-keyring                                                               [------------------------------------------------------------] 100%
==> Appending keys from endeavouros.gpg...
==> Updating trust database...
gpg: next trustdb check due at 2023-10-27
:: Running post-transaction hooks...
(1/4) Reloading system manager configuration...
(2/4) Arming ConditionNeedsUpdate...
(3/4) Checking which packages need to be rebuilt
error: could not open file /var/lib/pacman/sync/kernel-lts.db: Unrecognized archive format
error: could not open file /var/lib/pacman/sync/kernel-lts.db: Unrecognized archive format
error: could not open file /var/lib/pacman/sync/kernel-lts.db: Unrecognized archive format
error: could not open file /var/lib/pacman/sync/kernel-lts.db: Unrecognized archive format
foreign	chrome-gnome-shell
foreign	optimus-manager
(4/4) Updating the info directory file...

Resulting in the same error:

$ sudo pacman -Syu
error: GPGME error: No data
error: kernel-lts: missing required signature
:: Synchronizing package databases...
 endeavouros is up to date
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
 kernel-lts                                                                2,1 KiB  1018   B/s 00:02 [------------------------------------------------------------] 100%
error: GPGME error: No data
error: kernel-lts: missing required signature
error: failed to synchronize all databases (invalid or corrupted database (PGP signature))

Sorry for missing the reference to this repository :blush:

kernel-lts repository is not maintained anymore.

Please remove it from your /etc/pacman.conf and run your update command afterwards.

Yes, thanks, this seems to work. I’ve commented the 3 lines in the “pacman.conf” file and the update is running. Thanks for your help/input.

1 Like

Glad you got it working!

Also, judging by the active repositories in your pacman.conf, it seems that you have missed out on the latest changes in Arch’s repository structure.

For example, community repo doesn’t exist anymore so you could remove that as well. It has been merged into extra repo.

For reference: https://archlinux.org/news/git-migration-announcement/

Thanks for your advice! I’ll have a look at it.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.