Describe the issue
$ pacman -Syu
error: mingw32: signature from "Christoph Reiter (MSYS2 master key) <reiter.christoph@gmail.com>" is unknown trust
error: mingw64: signature from "Christoph Reiter (MSYS2 master key) <reiter.christoph@gmail.com>" is unknown trust
error: msys: signature from "Christoph Reiter (MSYS2 development key) <reiter.christoph@gmail.com>" is unknown trust
:: Synchronizing package databases...
mingw32 953.3 KiB 2.84 MiB/s 00:00 [#################################################] 100%
mingw32.sig 566.0 B 0.00 B/s 00:00 [#################################################] 100%
error: mingw32: signature from "Christoph Reiter (MSYS2 master key) <reiter.christoph@gmail.com>" is unknown trust
error: failed to update mingw32 (invalid or corrupted database (PGP signature))
mingw64 956.9 KiB 7.60 MiB/s 00:00 [#################################################] 100%
mingw64.sig 566.0 B 0.00 B/s 00:00 [#################################################] 100%
error: mingw64: signature from "Christoph Reiter (MSYS2 master key) <reiter.christoph@gmail.com>" is unknown trust
error: failed to update mingw64 (invalid or corrupted database (PGP signature))
msys 305.5 KiB 4.66 MiB/s 00:00 [#################################################] 100%
msys.sig 566.0 B 0.00 B/s 00:00 [#################################################] 100%
error: msys: signature from "Christoph Reiter (MSYS2 development key) <reiter.christoph@gmail.com>" is unknown trust
error: failed to update msys (invalid or corrupted database (PGP signature))
error: failed to synchronize all databases
Steps to Reproduce the Problem
- Install latest msys2 ‘https://repo.msys2.org/distrib/x86_64/msys2-x86_64-20210228.exe’
- Run ‘pacman -Syu’
- Describe what happens? Fails
- What did you expect to happen instead? Not fail
Do these command help?
From here https://www.msys2.org/news/#2020-06-29-new-packagers
Found fix for this problem here and it helped: https://blog.bachi.net/?p=5035
# rm -r /etc/pacman.d/gnupg/ # pacman-key --init # pacman-key --populate msys2
$ curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz $ curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig
# pacman -U --config <(echo) msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz
$ pacman -Syu
What worked for me was to delete
/var/lib/pacman/sync/*.db.sig
as well (i.e delete/var/lib/pacman/sync/*
)Fix for “error: mingw32: signature from “Christoph Reiter (MSYS2 development key) reiter.christoph@gmail.com” is unknown trust”
I got the
error: mingw32: signature from "Christoph Reiter (MSYS2 development key) <reiter.christoph@gmail.com>" is unknown trust.
To fix this you have to import the required gnupg key and assign it a high trust level.Steps for the fix:
Double click C:\msys2.exe
$
pacman -S mingw-w64-x86_64-roswell
You get the error: error: mingw32: signature from “Christoph Reiter (MSYS2 development key) reiter.christoph@gmail.com” is unknown trust
How to find the key:
Christoph Reiter’s page: https://lazka.github.io/
search results for the key: http://keyserver.ubuntu.com/pks/lookup?op=vindex&search=0x46bd761f7a49b0ec
The signature of Christoph Reiter’s key ends with: 46bd761f7a49b0ec
Set the firewall to allow outside connections.
Import the key using gpg, while still inside the msys2.exe window:
$ gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv 46bd761f7a49b0ec
Set the trust level for the key: Set it using pacman-key, NOT gpg, because it doesn’t work after setting it with gpg --edit-key, you still get the error “[…] Christoph Reiter (MSYS2 master key) […]is unknown trust” .
Set it to 5 i.e. ultimate trust - I don’t know the difference between trust levels- if level 4 is sufficient or 5 is required.
pacman-key --edit-key 5F944B027F7FE2091985AA2EFA11531AA0AA7F57
type trust at the gpg prompt:
gpg> trust
type 5:
Your decision? 5
type y for yes:
y
type quit
gpg> quit
While being inside the msys2.exe window run:
$ pacman-key --refresh-keys
synchronize the repository databases and update the system’s packages using:
$ pacman -Syu
P.S. I had problems installing sbcl (I didn’t test using ros install sbcl-bin) using the roswell verson from msys2, so I had to install it manually. I don’t know why the recent versions of roswell’s ros.exe (and sbcl) from msys2 don’t work on Windows, or if this is related to Windows 7.
Solution does not work:
Iain, But what is the procedure to resolve it? I tried a change in /etc/paman.conf: Siglevel = Never #Siglevel = required databaseoptional And nothing has changed!
I had same issue, I believe my firewall was too quick to prevent the complete download of the proper signatures. I was able to authorise them, but perhaps too late.
The mentioned commands solved it,
Might be due to anti virus or other security software.
They do not, GPG is simply broken here.
I faced the same problem when run MSYS2 by “./msys2_shell.cmd -msys” which is the default way.
This problem disappeared when I do it in the following way:
The first time of “pacman -Syu” has error at the end: error: command (/usr/bin/sh /usr/bin/sh -c while read -r f; do install-info “$f” /usr/share/info/dir 2> /dev/null; doneA) failed to execute correctly (this error message in each “pacman -S” command)
Then, I rerun “pacman -Syu” and it says:
So, looks everyting is fine?
Current workaround is just to disable signature verification until GPG is fixed.