Pacman-key --refresh-keys always hangs on the same key

Hey there, i’ve been trying to fix the “Invalid or corrupted database” error on my Manjaro pc so i ended up finding steps that i think might help me on my situation; though, after doing those steps and letting the command pacman-key --refresh-keys always hangs on the same key run for around 2 minutes the command always seems to hang at this specific key, though i’m not that new on Linux this is honestly one of the first times i’ve encountered something like this and am unsure on how to proceed.

gpg: refreshing 1 key from hkps://keyserver.ubuntu.com
gpg: key D7574483BB57B18D: "Jonathan Esk-Riddell <jr@jriddell.org>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

^ Where the command hangs, appreciate the help <3

You should never have to run this command manually. All keys are contained in their respective packages archlinux-keyring and manjaro-keyring.

This will reinstall the required packages and fix your issues (if they are keyring-related): [HowTo] Work around gpg verification issue on left behind systems

bash <(curl -s "https://notabug.org/megavolt/random-scripts/raw/master/fix-gpg-pacman.sh") --basic

I’m trying to do the steps as said by the Manjaro Team member Yochanan, check their answer on the forum post titled " Invalid or corrupted database"

Did the command you proposed, will also get back after it’s done.

The command seems to be stuck at the same key again…

gpg: key D7574483BB57B18D: "Jonathan Esk-Riddell <jr@jriddell.org>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1


hm… after 23min still nothing? Refreshing the database can take a really long time depending on the server workload.

Maybe use the aggressive method?

bash <(curl -s "https://notabug.org/megavolt/random-scripts/raw/master/fix-gpg-pacman.sh") --aggressive
gpg: refreshing 1 key from hkps://keyserver.ubuntu.com
gpg: key D7574483BB57B18D: "Jonathan Esk-Riddell <jr@jriddell.org>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1


Yesterday it stood for like 1,5 hours, i’ll try the agressive method in like 10 minutes just because maybe the command decides to work.

You should not need to refresh the keys once you populated them correctly.

Try first by skipping this step.

As in just sudo pacman-key --populate archlinux manjaro?

It gets stuck, very very stuck in fact.

::INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist
[INFO] Refresh GnuPG Database of pacman from the Internet
[QUESTION] Do you want to continue? [Yy/Nn] (Note that this can take a while.)
> [Yy/Nn] Y


(That is all)

Then, don’t update them. Use N.

Umm… How does one uhh, use N

With your keyboard: N

Oh you mean with the command oops

error: DEB_Arch_Extra: signature from "MegaLimited <support@mega.co.nz>" is unknown trust
:: Synchronizing package databases...
 core                                                             144,9 KiB  3,08 MiB/s 00:00 [#######################################################] 100%
 extra                                                           1642,9 KiB  9,27 MiB/s 00:00 [#######################################################] 100%
 community                                                          7,0 MiB  11,0 MiB/s 00:01 [#######################################################] 100%
 multilib                                                         145,5 KiB  2,84 MiB/s 00:00 [#######################################################] 100%
 DEB_Arch_Extra                                                     7,3 KiB  29,4 KiB/s 00:00 [#######################################################] 100%
error: DEB_Arch_Extra: signature from "MegaLimited <support@mega.co.nz>" is unknown trust
error: failed to synchronize all databases (invalid or corrupted database (PGP signature))
[INFO] Done. Note that you need to refresh the database for pamac also.

So, it should be ok? Now uhh, what was the command to refresh the pamac db again :face_in_clouds:

There is a problem with your optional database. Remove it or comment it out.

Commented out the DEB_Arch_Extra repo, doing Y on the Y/N prompt works now, will get back as soon as & if it finishes.

Yay, finished no problems.

:: Synchronizing package databases...
 core                                                             144,9 KiB   483 KiB/s 00:00 [#######################################################] 100%
 extra                                                           1642,9 KiB  10,0 MiB/s 00:00 [#######################################################] 100%
 community                                                          7,0 MiB  11,0 MiB/s 00:01 [#######################################################] 100%
 multilib                                                         145,5 KiB  3,23 MiB/s 00:00 [#######################################################] 100%
:: Starting full system upgrade...
 there is nothing to do
[INFO] Done. Note that you need to refresh the database for pamac also.

Now for pamac, how do i do that exactly?

Edit: I think i did it through the Add/Remove Software that ships with the OS but i’m still unsure what command it uses to “refresh the database”.

pamac update --force-refresh
1 Like

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