Open elieux opened 8 years ago
PATH
. Try running pacman in a special shell like set PATH=
, msys2_shell.bat
.gpg.exe
and pacman.exe
lines under the [UnloadDll]
section of your .ini file under C:\Program Files (x86)\MacType\ini
or C:\Program Files\MacType\ini
.update-core
for system upgrades and take care to follow the instructions.gpgme
libgpgme
, gnupg
and pacman
packages (you can temporarily disable signature checking in /etc/pacman.conf
)./etc/pacman.d/gnupg
, then pacman-key --init
, pacman-key --populate msys2
, pacman-key --refresh-keys
.autorebase.bat
is sometimes needed even for 64-bit MSYS2.export GPGME_DEBUG=9
before running pacman ...something... 2> ~/gpgmelog
and looking at the logfile ~/gpgmelog
.I removed my local Git installation since it has own gpg.exe
. I killed my MacType process. I reinstalled gnupg
and pacman
packages (I don't know how to reinstall gpgme
since pacman -S gpgme
won't work) with temporarily disabling signature checking in /etc/pacman.conf
. Then, when I remove /etc/pacman.d/gnupg
and then pacman-key --init
, pacman-key --populate msys2
, pacman-key --refresh-keys
, I got an error:
$ pacman-key --init
gpg: /etc/pacman.d/gnupg/trustdb.gpg: trustdb created
gpg: no ultimately trusted keys found
gpg: Generating pacman keyring master key...
gpg: skipping control `%no-protection' ()
+++++
.+++++
gpg: key 5BFE0383 marked as ultimately trusted
gpg: Done
==> Updating trust database...
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
$ pacman-key --populate msys2
==> Appending keys from msys2.gpg...
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
==> Locally signing trusted keys in keyring...
-> Locally signing key D55E7A6D7CE9BA1587C0ACACF40D263ECA25678A...
-> Locally signing key 123D4D51A1793859C2BE916BBBE514E53E0D0813...
-> Locally signing key B91BCF3303284BF90CC043CA9F418C233E652008...
-> Locally signing key 9DD0D4217D75A33B896159E6DA7EF2ABAEEA755C...
==> Importing owner trust values...
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: inserting ownertrust of 4
==> Updating trust database...
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0 valid: 1 signed: 4 trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1 valid: 4 signed: 3 trust: 0-, 0q, 0n, 4m, 0f, 0u
gpg: depth: 2 valid: 3 signed: 0 trust: 3-, 0q, 0n, 0m, 0f, 0u
$ pacman-key --refresh-keys
gpg: refreshing 8 keys from hkp://pool.sks-keyservers.net
gpg: requesting key 5BFE0383 from hkp server pool.sks-keyservers.net
gpg: requesting key CA25678A from hkp server pool.sks-keyservers.net
gpg: requesting key AEEA755C from hkp server pool.sks-keyservers.net
gpg: requesting key 3E0D0813 from hkp server pool.sks-keyservers.net
gpg: requesting key 3E652008 from hkp server pool.sks-keyservers.net
gpg: requesting key A47D45A1 from hkp server pool.sks-keyservers.net
gpg: requesting key 2C51581E from hkp server pool.sks-keyservers.net
gpg: requesting key 4CA56930 from hkp server pool.sks-keyservers.net
gpgkeys: key A5C4777EE7AF8299344B192750B20A585BFE0383 not found on keyserver
gpg: DBG: armor-keys-failed (KEY 0xA5C4777EE7AF8299344B192750B20A585BFE0383 BEGIN
) ->0
gpg: DBG: armor-keys-failed (KEY 0xA5C4777EE7AF8299344B192750B20A585BFE0383 FAILED 6
) ->6
gpg: key CA25678A: "Alexey Pavlov (Alexpux) <alexey.pawlow@gmail.com>" 4 new signatures
gpg: key AEEA755C: "Martell Malone (martell) <martellmalone@gmail.com>" 3 new signatures
gpg: key 3E0D0813: "Ray Donnelly (MSYS2 Developer - master key) <mingw.android@gmail.com>" 2 new signatures
gpg: key 3E652008: "Ignacio Casal Quinteiro <icquinteiro@gmail.com>" 2 new signatures
gpg: key A47D45A1: "Alexey Pavlov (Alexpux) <alexpux@gmail.com>" 1 new signature
gpg: key 2C51581E: "Martell Malone (MSYS2 Developer) <martellmalone@gmail.com>" not changed
gpg: key 4CA56930: "Ray Donnelly (MSYS2 Developer) <mingw.android@gmail.com>" 2 new signatures
gpg: Total number processed: 7
gpg: unchanged: 1
gpg: new signatures: 14
gpg: keyserver communications error: key not found
gpg: keyserver communications error: bad public key
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0 valid: 1 signed: 4 trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1 valid: 4 signed: 3 trust: 0-, 0q, 0n, 4m, 0f, 0u
gpg: depth: 2 valid: 3 signed: 0 trust: 3-, 0q, 0n, 0m, 0f, 0u
gpg: keyserver refresh failed: bad public key
==> ERROR: A specified local key could not be updated from a keyserver.
I also ran autorebase.bat
, but still getting errors when I run pacman -Su
:
$ pacman -Su
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
Packages (11) bash-4.3.042-2 curl-7.45.0-1 flex-2.6.0-1 gcc-libs-4.9.2-6
gmp-6.1.0-1 grep-2.22-1 libcurl-7.45.0-1 libreadline-6.3.008-6
mintty-1~2.2.1-1 msys2-runtime-2.4.0.16752.6eb10ef-1
ncurses-6.0.20151121-1
Total Download Size: 7.76 MiB
Total Installed Size: 33.82 MiB
Net Upgrade Size: -0.43 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages ...
msys2-runtime-2.4.0... 2.3 MiB 9.60M/s 00:00 [#####################] 100%
bash-4.3.042-2-x86_64 1865.2 KiB 9.15M/s 00:00 [#####################] 100%
gcc-libs-4.9.2-6-x86_64 646.9 KiB 8.54M/s 00:00 [#####################] 100%
gmp-6.1.0-1-x86_64 359.7 KiB 5.58M/s 00:00 [#####################] 100%
ncurses-6.0.2015112... 1117.3 KiB 4.53M/s 00:00 [#####################] 100%
libcurl-7.45.0-1-x86_64 167.7 KiB 5.28M/s 00:00 [#####################] 100%
curl-7.45.0-1-x86_64 578.7 KiB 4.87M/s 00:00 [#####################] 100%
flex-2.6.0-1-x86_64 280.4 KiB 5.71M/s 00:00 [#####################] 100%
grep-2.22-1-x86_64 220.7 KiB 2.32M/s 00:00 [#####################] 100%
libreadline-6.3.008... 243.3 KiB 2.45M/s 00:00 [#####################] 100%
mintty-1~2.2.1-1-x86_64 134.2 KiB 1561K/s 00:00 [#####################] 100%
(11/11) checking keys in keyring [#####################] 100%
(11/11) checking package integrity [#####################] 100%
error: GPGME error: Invalid crypto engine
error: GPGME error: Invalid crypto engine
error: GPGME error: Invalid crypto engine
error: GPGME error: Invalid crypto engine
error: GPGME error: Invalid crypto engine
error: GPGME error: Invalid crypto engine
error: GPGME error: Invalid crypto engine
error: GPGME error: Invalid crypto engine
error: GPGME error: Invalid crypto engine
error: GPGME error: Invalid crypto engine
error: GPGME error: Invalid crypto engine
:: File /var/cache/pacman/pkg/msys2-runtime-2.4.0.16752.6eb10ef-1-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n]
I'm sorry, the package name was wrong. Can you try re-installing libgpgme
and updating gcc-libs
, libcurl
, libreadline
, msys2-runtime
, and ncurses
? If you could install these one by one and test pacman (with sig checking enabled) between each installation, it would be awesome -- we'll be then more likely to figure out what was the issue.
If that doesn't help either, we need more information. Would you be able to capture the whole run of pacman with Process Monitor, save the logfile (in the PML format) and upload it somewhere for us? I would suggest strace, but it seems to have some bad interactions with pacman. :\
Also, in the future, remember to use update-core
before running pacman -Su
, because otherwise you will often get nasty post-install failures.
Hi, just quitting MacType process doesn't seem to stop hooking. I disable them and I rebooted, and then clean installing MSYS2 makes work with update-core
. Also pacman --needed -Sy bash pacman pacman-mirrors msys2-runtime
and pacman -Su
works.
Actually I realized that the cause is MacType by running Process Monitor. This is
Logfile.txt which is actually a zip file containing Logfile.PML
, download it and change its name to Logfile.zip
. I changed the filename because GitHub doesn't support attaching a file with zip extension.
Thanks for you help, and sorry for confusing!
Also, for MacType users, when you put following lines into your .ini
file under C:\Program Files (x86)\MacType\ini
or C:\Program Files\MacType\ini
, GPGME will works properly.
[UnloadDll]
gpg.exe
Thanks for the follow-up! I'll update the top post to include your fix.
For MacType users, if you have this problem even after adding gpg.exe
under [UnloadDll]
, try adding pacman.exe
also.
[UnloadDll]
gpg.exe
pacman.exe
Updated.
To people who find a solution here, please leave a comment to let us know what worked for you if you wouldn't mind. Thanks in advance.
Had this issue due to MacType; adding pacman.exe
and gpg.exe
to [UnloadDll]
solved my issue.
@hkmix: I've solved the problem because of your comment, thank you.
See the discussion on the mailing list: http://marc.info/?l=gnupg-devel&m=144604688823859&w=2
Important: on windows, gpgme needs a special executable gpgme-w32spawn.exe
. You can specify where to find this via e.g : gpgme_set_global_flag("w32-inst-dir", "C://Program Files (x86)//GnuPG/bin");
Also starting version 1.7.0 of GPGME it does a better job in finding GPG4Win on x64 systems.
I use MSYS2 with ConEmu and was having this issue as well. Running pacman -Syu
once in the msys2_shell.cmd
seems to have resolved the issue and now I can run it inside ConEmu again.
SELF-FIX: I'm on Win10 X64 and For me the issue was caused by Windows Firewall being on block outgoing connections that do not match a rule. Obviously I allowed pacman.exe first and that was allowing it to connect to the package server but not exchange the cryptographic keys, and was just giving a buncha non-descript crypto errors. So having dealt with weird crypto before just now installing the new Github Desktop for Windows, I fixed this one by finding the right .exes to firewall unblock. During the installer, it attempts to update itself, and do some kind of GNUPG trust/key server exchange handshake thing connecting out of gpg.exe (along with the gpg-keys.exe) TLDR: It worked after I allowed these executables: https://puu.sh/wIluc/d221041988.png and reinstalled. And for the svchost.exe its because it connects out via windows's inbuilt cryptographic services function, it connected to 191.232.80.53:443 (only that one) for me. Good luck.
I completely forgot about this issue but just had it again and found my own comment from several months ago, which fixed the problem for me again: https://github.com/Alexpux/MSYS2-packages/issues/393#issuecomment-299669754
In my experience this issue may also appear if Msys2 is installed on non-NTFS drive (Ext2fsd in my case). Reinstalling on C:\ works fine.
@isapir i run msys2_shell.cmd then solved this issue,this seems to be the bug of ConEmu
@runapp My debug output was pretty much the same as yours.
For me, the root cause actually turned out to be the same as an unrelated problem where git rebase interactive was hanging.
The culprit was good old BLODA COMODO. It was more obvious in that git problem because I saw high CPU usage from COMODO while git rebase -i
was hanging.
However, turning off all of COMODO's services/systems wasn't enough to fix the problem. The workaround (discussed here, here, here, and here) turned out to be to go to Settings > Advanced protection > Miscellaneous > Don't detect shellcode injections in these applications
and add File Groups > All Applications
to the exclusion list.
After that, git rebase interactive and pacman worked properly.
@ahiijny Thank you for your tips! Now msys is working flawlessly.
I just had another issue ( in Win 1803) - but the same "error: GPGME error: Invalid crypto engine " Even after re-installing MSYS2, it wasn't fixed. So I also tried the pacman-key --init and refresh-keys steps, to no avail. TLDR It was a setting I enabled in Windows Defender's advanced settings. SELF-FIX: You must disable: "Force Randomization for Images (Mandatory ASLR) - Force relocation of Images not Compiled with /DYNAMICBASE" by going into the Windows Defender Security Center - App and Browser Control > at the bottom theres a link to "Exploit Protection Settings" Should be set to "Use Default (Off)" - the other settings don't affect it, but this one for sure does, (I rebooted many times to narrow it down, and finally fixed it)
@ahiijny work fine after change comodo advance settings.
Software version:
Thanks.
I get this, but not with pacman, just executing various examples of the gpgme lib
import gpg
def print_engine_infos():
print("gpgme version:", gpg.core.check_version(None))
print("engines:")
for engine in gpg.core.get_engine_info():
print(engine.file_name, engine.version)
for proto in [gpg.constants.protocol.OpenPGP, gpg.constants.protocol.CMS]:
print("Have {}? {}".format(gpg.core.get_protocol_name(proto),
gpg.core.engine_check_version(proto)))
def print_engine_infos()
This yields
gpgme version: 1.10.0
engines:
C:\msys64\mingw32\bin\gpgconf.exe 1.0.0
/nonexistent 1.0.0
Have OpenPGP? False
Have CMS? False
Seems to find gpgconf.exe but not gpg.exe
anyone else having this problem?
@genbtc its the same story there, can you reproduce this behavior on your installation? does that python script prints something different for you?
@lovetox At first python gave me: ImportError: No module named gpg then i did $ pacman -S mingw64/mingw-w64-x86_64-gpgme Then i got: $ python gpgpy.py ('gpgme version:', '1.11.1') engines: ('C:\msys64\mingw64\bin\gpgconf.exe', '1.0.0') ('/nonexistent', '1.0.0') Have OpenPGP? False Have CMS? False
So same thing. Then i tried in Mingw32 and got the same "No Module named gpg" , so i did: $ pacman -S mingw32/mingw-w64-i686-gnupg (like i did before on 64, but still the same error.)
(also the last line in your script had a typo/bug, the last line said "def" again but it meant to call the first def.)
So its probably not 64/32 but that is some weird stuff. hope this helps. i dont have the answer.
I just tested this and i dont have the problem in the MSYS env, only in MINGW env, so i will move my issue
I also have this issue, I tried all the techniques described here but I still get the following error:
erreur : GPGME error: Moteur de chiffrement incorrect
erreur : la base de données « mingw32 » n’est pas valide (base de données invalide ou corrompue (signature PGP))
It was a fresh (and the 1st!) install of MSYS2 on a clean machine that I got just 2 weeks ago. It's running Win10 64-bits.
@ahiijny I had the exact same issue. Turning off the COMODO firewall was not enough. It would be really helpful if they would add this information to a note at the top of this thread. The BLODA hint is sort of vague (at least to me).
The culprit was good old BLODA COMODO. It was more obvious in that git problem because I saw high CPU usage from COMODO while
git rebase -i
was hanging.However, turning off all of COMODO's services/systems wasn't enough to fix the problem. The workaround (discussed here, here, here, and here) turned out to be to go to
Settings > Advanced protection > Miscellaneous > Don't detect shellcode injections in these applications
and addFile Groups > All Applications
to the exclusion list.After that, git rebase interactive and pacman worked properly.
Hi, I've bee trying all kinds of solutions and GPGME engine is always broken at the end. May be it could be possible to avoid update of some gpg components for a while to keep the sig database ok? I wonder why i see this topic from times ago and still no real solution... Regard, Gilles
I wonder why i see this topic from times ago and still no real solution...
Because the issue is in 90% of cases caused by the other software and the other 10% is virtually impossible to reproduce.
This error usually means that there are conflicting gpg installations installed. It can happen for example if you use gpgme from msys2 but also have GnuPG for Windows installed. We also see this on MacOS when using the homebrew version of gpgme on systems that also have MacGPG2 is installed.
Clean your system and make sure there is only one version of gpg.exe
and gpgconf.exe
on the PATH. This will almost always resolve your problems.
Yo quise compilar Super Mario 64 Plus en MSYS2 MINGW64 y me aparece esto: advertencia: No se ha encontrado el depósito público de claves; ¿ya se ha ejecutado «pacman-key --init»? error: Error de GPGME: Motor de cifrado no válido advertencia: No se ha encontrado el depósito público de claves; ¿ya se ha ejecutado «pacman-key --init»? error: Error de GPGME: Motor de cifrado no válido advertencia: No se ha encontrado el depósito público de claves; ¿ya se ha ejecutado «pacman-key --init»? error: Error de GPGME: Motor de cifrado no válido error: la base de datos «mingw32» no es válida (base de datos no válida o dañada (firma PGP)) error: la base de datos «mingw64» no es válida (base de datos no válida o dañada (firma PGP)) error: la base de datos «msys» no es válida (base de datos no válida o dañada (firma PGP))
Que debo hacer?
This is a super-issue for
GPGME error: Invalid crypto engine
and related errors.