安装gem时出错:无法为cygwin的堆保留空间,Win32错误487 [英] Error installing gem: Couldn't reserve space for cygwin's heap, Win32 error 487
问题描述
我试图在我的机器上安装 win32-api
gem,并且在构建本机扩展时遇到一些问题:
$ gem install win32-api --no-ri --rdoc
临时增强PATH以包含DevKit ...
构建本机扩展。这可能需要一段时间...
C:\Programs\dev_kit\bin\make.exe:***无法为cygwin的堆预留空间,Win32错误0
错误:安装win32-api时出错:
错误:无法构建gem原生扩展。
c:/Programs/ruby/bin/ruby.exe extconf.rb
检查strncpy_s()... no
创建Makefile
make
0 [main] us 0 init_cheap:VirtualAlloc指针为null,Win32错误487
AllocationBase 0x0,BaseAddress 0x60E90000,RegionSize 0x170000,State 0x10000
C:\Programs\dev_kit\bin \make.exe:***无法为cygwin的堆保留空间,Win32错误0
这个问题发生在安装试图编译本地扩展的任何gem时,例如json或win32-api。
我已经尝试更改虚拟内存的大小这台机器,但它没有工作。
我的配置:
- Ruby版本:1.8.7p371
- Gem版本:1.8.24
Bash 3.1.0 - DevKit 4.5.2
- Windows 7 x64
很多搜索和许多不同的尝试,这是为我修复它:
-
下载
rebase
来自 http://www.tishler.net/jason/software/rebase/(下载最新的* .exe版本)并运行它。 启动提示(以管理员身份运行)并转到dev-kit
文件夹(例如,我的C:\Programs\dev_kit
) -
在dev-kit文件夹中,运行
devkitvars.bat
将devkit添加到路径中。 -
现在做一个
cd bin
(它让我到C:\Programs\dev_kit\\ bin
)并从那里运行:
rebase -b 0x30000000 msys-1.0.dll
尝试再次安装宝石。现在,您应该看到构建本机扩展,而不是看到错误消息。这可能需要一段时间...
,它会在那里挂起一段时间。
您的宝石应该在几分钟/秒后成功安装。没有更多的头痛:)
I'm trying to install win32-api
gem on my machine and I'm facing some issues when building native 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's 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's heap, Win32 error 0
This problem happens when installing any gem that tries to compile a native extension, like json or win32-api, for instance.
I already tried to change the size of virtual memory of this machine, but it didn't work.
My configuration:
- Ruby version: 1.8.7p371
- Gem version: 1.8.24
- Bash 3.1.0
- DevKit 4.5.2
- Windows 7 x64
I was facing the exact same issue and after making a lot of searches and many different tries, this is what fixed it for me:
Download
rebase
from http://www.tishler.net/jason/software/rebase/ (download the latest *.exe version) and run it.Fire up a Prompt ("Run as administrator") and go to your
dev-kit
folder (for instance, mine wasC:\Programs\dev_kit
)While in the dev-kit folder, run
devkitvars.bat
to add devkit to the path.Now do a
cd bin
(it got me toC:\Programs\dev_kit\bin
) and from there run:rebase -b 0x30000000 msys-1.0.dll
Try to install the gems again. Instead of seeing an error message, now you should see Building native extensions. This could take a while...
and it will hang for a while there.
Your gem should be successfully installed after a couple of minutes/seconds. No more headaches :)
这篇关于安装gem时出错:无法为cygwin的堆保留空间,Win32错误487的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!