Error installing gem: failed to reserve space for cygwin heap, Win32 error 487

I am trying to install win32-api gem on my machine, and I have to face some problems when creating my own extensions:

 $ gem install win32-api --no-ri --rdoc Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... C:\Programs\dev_kit\bin\make.exe: *** Couldn't reserve space for cygwin heap, Win32 error 0 ERROR: Error installing win32-api: ERROR: Failed to build gem native extension. c:/Programs/ruby/bin/ruby.exe extconf.rb checking for strncpy_s()... no creating Makefile make 0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487 AllocationBase 0x0, BaseAddress 0x60E90000, RegionSize 0x170000, State 0x10000 C:\Programs\dev_kit\bin\make.exe: *** Couldn't reserve space for cygwin heap, Win32 error 0 

This problem occurs when installing any stone that tries to compile a native extension, for example json or win32-api.

I already tried to resize the virtual memory of this machine, but it did not work.

My configuration:

  • Ruby version: 1.8.7p371
  • Gem Version: 1.8.24
  • Bash 3.1.0
  • DevKit 4.5.2
  • Windows 7 x64
+6
source share
1 answer

I ran into the same problem, and after doing many searches and many different attempts, I fixed this for me:

  • Download rebase from http://www.tishler.net/jason/software/rebase/ (download the latest version * .exe) and run it.

  • Run the request ("Run as administrator") and go to the dev-kit folder (for example, mine was C:\Programs\dev_kit )

  • In the dev-kit devkitvars.bat , run devkitvars.bat to add devkit to the path.

  • Now make cd bin (it got me to C:\Programs\dev_kit\bin ) and from there started:

     rebase -b 0x30000000 msys-1.0.dll 

Try setting the gems again. Instead of seeing the error message, you should now see Building native extensions. This could take a while... Building native extensions. This could take a while... and it will hang there for a while.

Your gem should be successfully installed in a couple of minutes / seconds. More headaches :)

+12
source

Source: https://habr.com/ru/post/955538/


All Articles