oscar@w10x64-vm-sky MINGW64 ~
$ pacman -Suy
:: Synchronizing package databases...
mingw32 468.8 KiB 652 KiB/s 00:01 [#####################] 100%
mingw32.sig 119.0 B 0.00 B/s 00:00 [#####################] 100%
mingw64 471.4 KiB 3.27 MiB/s 00:00 [#####################] 100%
mingw64.sig 119.0 B 0.00 B/s 00:00 [#####################] 100%
msys 189.8 KiB 0.00 B/s 00:00 [#####################] 100%
msys.sig 438.0 B 0.00 B/s 00:00 [#####################] 100%
error: msys: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" is unknown
:: Import PGP key 4A6129F4E4B84AE46ED7F635628F528CF3053E04? [Y/n]
error: msys: signature from "David Macek <david.macek.0@gmail.com>" is unknown trust
error: failed to update msys (invalid or corrupted database (PGP signature))
error: failed to synchronize all databases
oscar@w10x64-vm-sky MINGW64 ~
$ pacman -Suy
error: msys: signature from "David Macek <david.macek.0@gmail.com>" is unknown trust
:: Synchronizing package databases...
mingw32 is up to date
mingw64 is up to date
msys 189.8 KiB 450 KiB/s 00:00 [#####################] 100%
msys.sig 438.0 B 0.00 B/s 00:00 [#####################] 100%
error: msys: signature from "David Macek <david.macek.0@gmail.com>" is unknown trust
error: failed to update msys (invalid or corrupted database (PGP signature))
error: failed to synchronize all databases
oscar@w10x64-vm-sky MINGW64 ~
$
See https://www.msys2.org/news/#2020-06-29-new-packagers
I was originally having this problem, but while I was writing this post, it got fixed, so I just post this for reference.
I updated via
pacman -Syu
yesterday, all was fine.Today I get this error, and I found this bug, and I’m trying to follow the steps:
Previously, at this point, I restarted the MSYS2 terminal, and then ran
pacman -Syu
, which failed again for me - but this time I did not restart the terminal after last command, instead I just proceeded directly:Restarted MSYS2 terminal here - and now
pacman -Syu
is fine:Analysis of the problem
‘pacman-key --populate msys2’ will not work, as the new package listing new packagers has not be installed (and can’t be) due to key issues.
Likewise, ‘pacman-key --refresh-key’ will do nothing, as it can’t know who the new packagers are
If adding keys manually to work around that, pacman-key will fail as the keyserver seems to default to a non working pool (hkps://hkps.pool.sks-keyservers.net):
Adding hkp://pgp.mit.edu:11371 doesn’t seem to work either
Proposed workaround
In 3 steps:
manually import David Macek key into pacman-key gnupg pubring
add a working keyserver to pacman-key gnupg configuration : https://bbs.archlinux.org/viewtopic.php?id=233362 suggest ubuntu keyserver
update the trust database
Step 1 : add the key manually
Step 2: add a keyserver manually
Step 3: refresh the keys manually
What happens
Before: package installation or upgrade failed
After: the temporary workaround allows the new key to be properly added:
I believe this is sufficient to close this issue.
pacman-key --init; pacman-key --populate
I was able to fix this by roughly following what @csdvrx proposed. But it felt wrong to just trust some key downloaded from somewhere (I’m talking about the
# wget https://github.com/1480c1.gpg
step). So here is what I did:First, this was the error I was getting when running
pacman -Syu
:The way I fixed it:
After this
pacman -Syu
worked again. I did not need to close any windows or the like.I did not get errors initially, but I’ve been having new packages fail to verify. The solution for me turned out to be
pacman -S msys2-keyring
, after whichpacman -Syu
worked again.This useless link is mentioned in all tickets related to that failure with msys2 update (it doesn’t work for me, not sure what I need to run, and I don’t want to read that long poem). I’ve used msys2 for many years, have never had any problems, and this update with key is a huge failure imo. No clear answer what to run to make and update/upgrade. This should have been handled properly instead of breaking things for everybody.
After running all possible commands mentioned all over the place, I still cannot update and get this error from running
pacman -Syuu
:@pps83rbx The following steps worked for me when updating an older msys2 version:
pacman --noconfirm -U "http://repo.msys2.org/msys/x86_64/libzstd-1.4.4-2-x86_64.pkg.tar.xz"
pacman --noconfirm -U "http://repo.msys2.org/msys/x86_64/zstd-1.4.4-2-x86_64.pkg.tar.xz"
pacman --noconfirm -U "http://repo.msys2.org/msys/x86_64/pacman-5.2.1-6-x86_64.pkg.tar.xz"
pacman --noconfirm -Sydd pacman
pacman --noconfirm -Syuu
pacman --noconfirm -Syuu
Googling the error, it redirects here. After doing
rm -r /etc/pacman.d/gnupg/ && pacman-key --init && pacman-key --populate msys2 && pacman-key --refresh-keys
, looks like some gpg keys has erros:The error still persists:
Maybe 3 or 4 years ago, I’ve posted a workaround here to a different MSYS error preventing me to upgrade the system.
The exact same workaround works with this one:
/etc/pacman.conf
addSigLevel = Never
and save.rm -r /etc/pacman.d/gnupg/ && pacman-key --init && pacman-key --populate msys2
pacman -Suy
again, it should work without any further issues.SigLevel = Never
from/etc/pacman.conf
and save.Now everything should be working.
Hope it helps.
Thanks, I just did and indeed that fixed it. Sorry for the noise
error: mingw32: key “4A6129F4E4B84AE46ED7F635628F528CF3053E04” is unknown :: Import PGP key 4A6129F4E4B84AE46ED7F635628F528CF3053E04? [Y/n] error: key “4A6129F4E4B84AE46ED7F635628F528CF3053E04” could not be looked up remotely error: mingw64: key “4A6129F4E4B84AE46ED7F635628F528CF3053E04” is unknown :: Import PGP key 4A6129F4E4B84AE46ED7F635628F528CF3053E04? [Y/n] error: key “4A6129F4E4B84AE46ED7F635628F528CF3053E04” could not be looked up remotely error: msys: key “4A6129F4E4B84AE46ED7F635628F528CF3053E04” is unknown :: Import PGP key 4A6129F4E4B84AE46ED7F635628F528CF3053E04? [Y/n] error: key “4A6129F4E4B84AE46ED7F635628F528CF3053E04” could not be looked up remotely error: database ‘mingw32’ is not valid (invalid or corrupted database (PGP signature)) error: database ‘mingw64’ is not valid (invalid or corrupted database (PGP signature)) error: database ‘msys’ is not valid (invalid or corrupted database (PGP signature)) Install MSYS2 and MINGW development toolchain failed Installation failed: pacman failed
I tried all of the option that you have suggested over here but none of it doesnt work for me