rubyinstaller: Can't correctly install 2.4.1-1-x64 with MSYS2 on Win10x64
I attempted to transition from 2.2 to 2.4 and quickly install the json gem.
I was prompted to install MSYS2 and proceeded. About 66% through that install, an error 127 occurred when a bash-login was attempted. I tried to re-try but it never succeeded, so I skipped it and the installation completed without further issues, according to the MSYS2 status checks from my console output.
I just wanted to install Ruby and the JSON gem; that’s all. I didn’t have to deal with MSYS2 installations in 2.2.x, so I don’t know if new precedents were set and not thoroughly communicated. Previously, I would install the RDK in-lieu of MSYS2. I saw no instructions to do this, so I did not.
I am on a proxy. I don’t remember needing to do anything special to get gems installing, however.
C:\Ruby24-x64\bin>.\gem install json
Fetching: json-2.1.0.gem (100%)
MSYS2 could not be found. Please run 'ridk install'
or download and install MSYS2 manually from https://msys2.github.io/
C:\Ruby24-x64\bin>ridk install
_____ _ _____ _ _ _ ___
| __ \ | | |_ _| | | | | | |__ \
| |__) | _| |__ _ _ | | _ __ ___| |_ __ _| | | ___ _ __ ) |
| _ / | | | '_ \| | | | | | | '_ \/ __| __/ _` | | |/ _ \ '__/ /
| | \ \ |_| | |_) | |_| |_| |_| | | \__ \ || (_| | | | __/ | / /_
|_| \_\__,_|_.__/ \__, |_____|_| |_|___/\__\__,_|_|_|\___|_||____|
__/ | _
|___/ _|_ _ __ | | o __ _| _ _
| (_) | |^| | | |(_|(_)\^/_>
1 - MSYS2 base installation
2 - MSYS2 repository update
3 - MSYS2 and MINGW development toolchain
Which components shall be installed? [1,2,3] 1
MSYS2 seems to be unavaiable
Verify integrity of msys2-x86_64-20161025.exe ... OK
Run the MSYS2 installer ...
> C:\Users\userName\AppData\Local\Temp/msys2-x86_64-20161025.exe
Success
1 - MSYS2 base installation
2 - MSYS2 repository update
3 - MSYS2 and MINGW development toolchain
Which components shall be installed? []
C:\Ruby24-x64\bin>.\gem install json
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.1.0/ext/json/ext/generator
C:/Ruby24-x64/bin/ruby.exe -r ./siteconf20170607-1540-zrptcx.rb extconf.rb
creating Makefile
current directory: C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.1.0/ext/json/ext/generator
make "DESTDIR=" clean
'make' is not recognized as an internal or external command,
operable program or batch file.
current directory: C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.1.0/ext/json/ext/generator
make "DESTDIR="
'make' is not recognized as an internal or external command,
operable program or batch file.
make failed, exit code 1
Gem files will remain installed in C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.1.0 for inspection.
Results logged to C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/json-2.1.0/gem_make.out
C:\Ruby24-x64\bin>ridk install
_____ _ _____ _ _ _ ___
| __ \ | | |_ _| | | | | | |__ \
| |__) | _| |__ _ _ | | _ __ ___| |_ __ _| | | ___ _ __ ) |
| _ / | | | '_ \| | | | | | | '_ \/ __| __/ _` | | |/ _ \ '__/ /
| | \ \ |_| | |_) | |_| |_| |_| | | \__ \ || (_| | | | __/ | / /_
|_| \_\__,_|_.__/ \__, |_____|_| |_|___/\__\__,_|_|_|\___|_||____|
__/ | _
|___/ _|_ _ __ | | o __ _| _ _
| (_) | |^| | | |(_|(_)\^/_>
1 - MSYS2 base installation
2 - MSYS2 repository update
3 - MSYS2 and MINGW development toolchain
Which components shall be installed? [1,2,3] 3
MSYS2 seems to be already installed
Install MSYS2 and MINGW development toolchain ...
> pacman -S --needed --noconfirm autoconf autoconf2.13 autogen automake-wrapper automake1.10 automake1.11 automake1.12 automake1.13 automake1.14 automake1.15 automake1.6 automake1.7 automake1.8 automake1.9 diffutils file gawk grep libtool m4 make patch pkg-config 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-pkg-config mingw-w64-x86_64-tools-git mingw-w64-x86_64-winpthreads-git mingw-w64-x86_64-winstorecompat-git
warning: file-5.28-2 is up to date -- skipping
warning: gawk-4.1.4-1 is up to date -- skipping
warning: grep-2.26-1 is up to date -- skipping
warning: m4-1.4.17-4 is up to date -- skipping
warning: sed-4.2.2-2 is up to date -- skipping
warning: wget-1.18-1 is up to date -- skipping
error: target not found: mingw-w64-x86_64-winstorecompat-git
Install MSYS2 and MINGW development toolchain failed
Installation failed: pacman failed
1 - MSYS2 base installation
2 - MSYS2 repository update
3 - MSYS2 and MINGW development toolchain
Which components shall be installed? [] 2
MSYS2 seems to be already installed
MSYS2 repository update ...
> pacman -Sy --needed --noconfirm
:: Synchronizing package databases...
mingw32 6.7 KiB 157K/s 00:00 [#######################################] 100%
mingw32.sig 6.7 KiB 153K/s 00:00 [#######################################] 100%
error: GPGME error: No data
error: failed to update mingw32 (invalid or corrupted database (PGP signature))
mingw64 6.7 KiB 157K/s 00:00 [#######################################] 100%
mingw64.sig 6.7 KiB 157K/s 00:00 [#######################################] 100%
error: GPGME error: No data
error: failed to update mingw64 (invalid or corrupted database (PGP signature))
msys 6.7 KiB 153K/s 00:00 [#######################################] 100%
msys.sig 6.7 KiB 153K/s 00:00 [#######################################] 100%
error: GPGME error: No data
error: failed to update msys (invalid or corrupted database (PGP signature))
error: failed to synchronize any databases
error: failed to init transaction (invalid or corrupted database (PGP signature))
MSYS2 repository update failed
Installation failed: pacman failed
1 - MSYS2 base installation
2 - MSYS2 repository update
3 - MSYS2 and MINGW development toolchain
Which components shall be installed? [] 1
MSYS2 seems to be already installed
1 - MSYS2 base installation
2 - MSYS2 repository update
3 - MSYS2 and MINGW development toolchain
Which components shall be installed? [] 3
MSYS2 seems to be already installed
Install MSYS2 and MINGW development toolchain ...
> pacman -S --needed --noconfirm autoconf autoconf2.13 autogen automake-wrapper automake1.10 automake1.11 automake1.12 automake1.13 automake1.14 automake1.15 automake1.6 automake1.7 automake1.8 automake1.9 diffutils file gawk grep libtool m4 make patch pkg-config 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-pkg-config mingw-w64-x86_64-tools-git mingw-w64-x86_64-winpthreads-git mingw-w64-x86_64-winstorecompat-git
error: GPGME error: No data
error: GPGME error: No data
error: GPGME error: No data
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
1 - MSYS2 base installation
2 - MSYS2 repository update
3 - MSYS2 and MINGW development toolchain
Which components shall be installed? [] C:/Ruby24-x64/lib/ruby/site_ruby/2.4.0/ruby_installer/runtime/ridk.rb:68:in `gets': Interrupt
from C:/Ruby24-x64/lib/ruby/site_ruby/2.4.0/ruby_installer/runtime/ridk.rb:68:in `block in install'
from C:/Ruby24-x64/lib/ruby/site_ruby/2.4.0/ruby_installer/runtime/ridk.rb:62:in `loop'
from C:/Ruby24-x64/lib/ruby/site_ruby/2.4.0/ruby_installer/runtime/ridk.rb:62:in `install'
from C:/Ruby24-x64/lib/ruby/site_ruby/2.4.0/ruby_installer/runtime/ridk.rb:14:in `run!'
from C:/Ruby24-x64/bin/ridk.cmd:32:in `<main>'
Terminate batch job (Y/N)? y
C:\Ruby24-x64\bin>
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 24 (6 by maintainers)
I was able to fix this by running
pacman -Syymanually.I had a similar issue, failing on the
pacman, step 2. I did not have a manual mingw install. However, theridk installwas picking up amingwinstallation! This turned out to be a mingw distributed by the Windows Git installation.I figured that out after a
ridk enableaddedC:\Program Files\Git\mingw\binto thePATH. This happened because I hadC:\Program Files\Gitin my path. After removing it,ridk installcorrectly picks up that no mingw exists and now it is installing everything correctly.I do not know if the mingw distributed with Git can be used, as it seems to be lacking some tools.
Normally, you would run pacman commands in the MSYS2 bash shell.
If MSYS2 is installed, you should have shortcuts, otherwise, I believe on a normal 64 bit system, the bash shell launches with:
Once that opens, you can enter pacman commands. Note that since it’s a bash shell, insert/paste is Shift-Insert
pacman -Sy pacmanto solve it@the-nose-knows Did you try to run
C:\gem install jsoneg. from Windows command prompt (cmd.exe), not from msys bash?@seanvree That is actually again seems to be a communication issue. See RubyInstaller2 - Gems With Additional Library Dependencies.