msys2 / MSYS2-packages

Package scripts for MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
1.29k stars 486 forks source link

error on msys2 system update command "pacman -Syu" #1429

Open Dwitee opened 6 years ago

Dwitee commented 6 years ago

$ pacman -Syu error: mingw32: signature from "Alexey Pavlov (Alexpux) alexpux@gmail.com" is invalid error: mingw64: signature from "Alexey Pavlov (Alexpux) alexpux@gmail.com" is invalid :: Synchronising package databases... mingw32 486.2 KiB 2009K/s 00:00 [#####################] 100% mingw32.sig 119.0 B 0.00B/s 00:00 [#####################] 100% error: mingw32: signature from "Alexey Pavlov (Alexpux) alexpux@gmail.com" is invalid error: failed to update mingw32 (invalid or corrupted database (PGP signature)) mingw64 487.2 KiB 2021K/s 00:00 [#####################] 100% mingw64.sig 119.0 B 0.00B/s 00:00 [#####################] 100% error: mingw64: signature from "Alexey Pavlov (Alexpux) alexpux@gmail.com" is invalid error: failed to update mingw64 (invalid or corrupted database (PGP signature)) msys is up to date error: database 'mingw32' is not valid (invalid or corrupted database (PGP signature)) error: database 'mingw64' is not valid (invalid or corrupted database (PGP signature))

StarWolf3000 commented 6 years ago

Does it work after $ pacman-key --refresh-keys ?

levirs565 commented 4 years ago

pacman-key --refresh-keys does not work its print:

levir@DESKTOP-L2QCLG3 MSYS ~
$ pacman-key --refresh-keys
gpg: refreshing 8 keys from hkps://hkps.pool.sks-keyservers.net
gpg: keyserver refresh failed: General error
==> ERROR: A specified local key could not be updated from a keyserver.
paniq commented 4 years ago

I have the same problem as @levirs565, and the same output.

Biswa96 commented 4 years ago

This instruction may help https://www.msys2.org/news/#2020-06-29-new-packages.

levirs565 commented 4 years ago

You can fix this problem with uninstalling msys2 then download newest version of msys2 and install it. This solution work for me.

starcatter commented 4 years ago

Can confirm the instruction worked for me.

bit-web24 commented 3 years ago

We have prepared the following steps to verify and install the new keyring manually after which you should be able to use pacman -Syu again:

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-key --verify msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig

==> Checking msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig... (detached) gpg: Signature made Mon Jun 29 07:36:14 2020 CEST gpg: using DSA key AD351C50AE085775EB59333B5F92EFC1A47D45A1 gpg: Good signature from "Alexey Pavlov (Alexpux) alexpux@gmail.com" [full]

pacman -U msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz

If you can't even import the key and the above command fails like this:

error: msys: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" is unknown :: Import PGP key 4A6129F4E4B84AE46ED7F635628F528CF3053E04? [Y/n] [...] error: database 'msys' is not valid (invalid or corrupted database (PGP signature)) loading packages... error: failed to prepare transaction (invalid or corrupted database)

... you have to convince pacman to not care about those databases for a while, for example like this:

pacman -U --config <(echo) msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz

If you still see signature errors, resetting your pacman key store might help:

rm -r /etc/pacman.d/gnupg/
pacman-key --init
pacman-key --populate msys2