oneclick / rubyinstaller2

MSYS2 based RubyInstaller for Windows
https://rubyinstaller.org
BSD 3-Clause "New" or "Revised" License
644 stars 248 forks source link

Following Ruby install, MSYS2 and MINGW install script gets almost 100% errors (cywin heap mismatch?) #335

Open O-J1 opened 1 year ago

O-J1 commented 1 year ago

What problems are you experiencing?

Inability to run the MSYS2 and MINGW install scripts that are part of "ridk install" . I have spent about 3hrs trying to troubleshoot this to no avail. Apologies if I am missing something stupid

Steps to reproduce

OS Name: OS Name Microsoft Windows 11 Enterprise Version: Version 10.0.22621 Build 22621 Windows Defender is on with default settings (Ive seen mention of ASLR could be an issue?)

  1. Install Ruby 2.7, 2.6.6 or 3.1, the version doesnt seem to matter. I was originally trying to install 2.6.6 due to an authors reccomendations
  2. Use existing MSYS2 install (added the bin to path, installed latest version as of today)
  3. Run 'ridk install'
  4. Get a bunch of errors including references to CYGWIN heap mismatch

What's the output from ridk version?

Which components shall be installed? If unsure press ENTER [1,3]

> sh -lc true
mkdir: cannot create directory ‘’: No such file or directory
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
chmod: cannot access '/trustdb.gpg': No such file or directory
/usr/bin/pacman-key: line 244: ((: >= 0 : syntax error: operand expected (error token is ">= 0 ")
==> ERROR: You do not have sufficient permissions to read the pacman keyring.
==> Use 'pacman-key --init' to correct the keyring permissions.
==> ERROR: You do not have sufficient permissions to read the pacman keyring.
==> Use 'pacman-key --init' to correct the keyring permissions.

###################################################################
#                                                                 #
#                                                                 #
#                   C   A   U   T   I   O   N                     #
#                                                                 #
#                  This is first start of MSYS2.                  #
#       You MUST restart shell to apply necessary actions.        #
#                                                                 #
#                                                                 #
###################################################################

MSYS2 seems to be properly installed
Install MSYS2 and MINGW development toolchain ...
> pacman -S --needed --noconfirm autoconf autogen automake-wrapper diffutils file gawk grep libtool m4 make patch sed texinfo texinfo-tex wget mingw-w64-x86_64-binutils mingw-w64-x86_64-crt-git mingw-w64-x86_64-gcc mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-headers-git mingw-w64-x86_64-libmangle-git mingw-w64-x86_64-libwinpthread-git mingw-w64-x86_64-make mingw-w64-x86_64-tools-git mingw-w64-x86_64-winpthreads-git pkgconf mingw-w64-x86_64-pkgconf
warning: Public keyring not found; have you run 'pacman-key --init'?
      0 [main] pacman (11408) C:\Ruby27-x64\msys64\usr\bin\pacman.exe: *** fatal error - cygheap base mismatch detected - 0x1620408/0x1610408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.
      0 [main] pacman 145 dofork: child -1 - forked process 11408 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
      0 [main] pacman (9488) C:\Ruby27-x64\msys64\usr\bin\pacman.exe: *** fatal error - cygheap base mismatch detected - 0x1620408/0x1610408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.
 100460 [main] pacman 145 dofork: child -1 - forked process 9488 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
      0 [main] pacman (12944) C:\Ruby27-x64\msys64\usr\bin\pacman.exe: *** fatal error - cygheap base mismatch detected - 0x1620408/0x1610408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.
 183792 [main] pacman 145 dofork: child -1 - forked process 12944 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
error: GPGME error: Invalid crypto engine
error: mingw32: missing required signature
warning: Public keyring not found; have you run 'pacman-key --init'?
error: GPGME error: Invalid crypto engine
error: mingw64: missing required signature
warning: Public keyring not found; have you run 'pacman-key --init'?
error: GPGME error: Invalid crypto engine
error: ucrt64: missing required signature
warning: Public keyring not found; have you run 'pacman-key --init'?
error: GPGME error: Invalid crypto engine
error: clang32: missing required signature
warning: Public keyring not found; have you run 'pacman-key --init'?
error: GPGME error: Invalid crypto engine
error: clang64: missing required signature
warning: Public keyring not found; have you run 'pacman-key --init'?
error: GPGME error: Invalid crypto engine
error: msys: missing required signature
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 'ucrt64' is not valid (invalid or corrupted database (PGP signature))
error: database 'clang32' is not valid (invalid or corrupted database (PGP signature))
error: database 'clang64' 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

   1 - MSYS2 base installation
   2 - MSYS2 system update (optional)
   3 - MSYS2 and MINGW development toolchain

Which components shall be installed? If unsure press ENTER []
Largo commented 1 year ago

Have you tried running ridk exec pacman-key --init Also did you try this?

Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.