本文翻译自:Git Extensions: Win32 error 487: Couldn't reserve space for cygwin's heap, Win32 error 0
Git Extensions: Everything was working fine until yesterday. Git扩展:直到昨天一切正常。
But suddenly I am get this error when I try to pull some repositories using git extensions
但是当我尝试使用git extensions
拉一些存储库时,突然出现了这个错误
C:\Program Files\Git\bin\git.exe pull --progress "origin"
Done
0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487
AllocationBase 0x0, BaseAddress 0x68560000, RegionSize 0x390000, State 0x10000
C:\Program Files\Git\bin\sh.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0
It is happening for all the repositories which I have cloned. 我克隆的所有存储库都在发生这种情况。 But, my git bash is working fine. 但是,我的git bash运行正常。 I don't have any idea what is going on. 我不知道发生了什么。 Any idea as to why this is happening? 知道为什么会这样吗?
#1楼
参考:https://stackoom.com/question/1FdTT/Git扩展-Win-错误-无法为cygwin的堆保留空间-Win-错误
#2楼
Cygwin uses persistent shared memory sections, which can on occasion become corrupted. Cygwin使用永久共享内存部分,该部分有时可能会损坏。 The symptom of this is that some Cygwin programs begin to fail, but other applications are unaffected. 其症状是某些Cygwin程序开始失败,但其他应用程序不受影响。 Since these shared memory sections are persistent, often a system reboot is needed to clear them out before the problem can be resolved. 由于这些共享内存部分是持久性的,因此通常需要重新引导系统才能清除它们,然后才能解决问题。
#3楼
If a reboot does not correct the problem (as suggested by Greg Hegwill's answer) then check your PATH for conflicting installation(s) of the msys-1.0.dll (and possibly other related DLLs). 如果重新启动不能解决问题(如Greg Hegwill的回答所建议),则请检查您的PATH中是否存在与msys-1.0.dll(以及其他相关DLL)冲突的安装。
In my particular situation MinGW's installation of msys has a copy of that DLL in its bin
directory ( <MinGW_Install_Path>\\msys\\1.0\\bin
), and it was listed in the PATH. 在我的特定情况下,MinGW的msys安装在其bin
目录( <MinGW_Install_Path>\\msys\\1.0\\bin
)中具有该DLL的副本,并且该副本在PATH中列出。 Git's cmd
directory was listed in the PATH, but its bin
was not. Git的cmd
目录在PATH中列出,但其bin
不在其中。 (Git's version of msys-1.0.dll is in the bin
directory. Apparently the default installation of MSys-Git does not add its bin
to the PATH.) (Git的msys-1.0.dll版本位于bin
目录中。显然,MSys-Git的默认安装不会将其bin
添加到PATH。)
A temporary fix was to add Git's bin
directory to the PATH so that it appears before MinGW's paths. 暂时的解决方法是将Git的bin
目录添加到PATH,以便它出现在MinGW的路径之前。 (A more permanent fix will likely involve sorting out the path conflicts between MinGW's msys and Git's and/or removing the duplicate msys installations.) (一个更永久的修复程序可能涉及解决MinGW的msys与Git的路径冲突和/或删除重复的msys安装。)
#4楼
I have seen the same error message after upgrading to git1.8.5.2: 升级到git1.8.5.2后,我看到了相同的错误消息:
Simply make a search for all msys-1.0.dll
on your C:\\
drive, and make the one used by Git comes first. 只需在C:\\
驱动器上搜索所有msys-1.0.dll
,然后让Git使用的文件优先出现即可。
For instance, in my case I simply changed the order of: 例如,就我而言,我只是更改了以下顺序:
C:\prgs\Gow\Gow-0.7.0\bin\msys-1.0.dll
C:\prgs\git\PortableGit-1.8.5.2-preview20131230\bin\msys-1.0.dll
By making the Git path C:\\prgs\\git\\PortableGit-1.8.5.2-preview20131230\\bin\\
come first in my %PATH%
, the error message disappeared. 通过使Git路径C:\\prgs\\git\\PortableGit-1.8.5.2-preview20131230\\bin\\
首先出现在我的%PATH%
,错误消息消失了。
No need to reboot or to even change the DOS session. 无需重新启动,甚至不需要更改DOS会话。
Once the %PATH%
is updated in that DOS session, the git commands just work. 在该DOS会话中更新%PATH%
,git命令就可以使用了。
Note that carmbrester and Sixto Saez both report below (in the comments) having to reboot in order to fix the issue. 请注意, carmbrester和Sixto Saez均在下面的报告中(在评论中)必须重新启动才能解决此问题。
Note: First, also removing any msys-1.0.dll
, like one in %LOCALAPPDATA%
注意:首先,还要删除所有msys-1.0.dll
,例如%LOCALAPPDATA%
一个。
#5楼
I have encountered this issue witht he LPCEXpresso building.if you have the C:\\MinGW\\bin in the PATH. 如果您在PATH中有C:\\ MinGW \\ bin,则我在LPCEXpresso building中遇到了此问题。 somehow I had to remove it to get rid of this issue since some other MinGW like based too 我不得不删除它以摆脱这个问题,因为其他一些MinGW也基于
#6楼
I had the same problem. 我有同样的问题。 I found solution here http://jakob.engbloms.se/archives/1403 我在这里找到了解决方案http://jakob.engbloms.se/archives/1403
c:\msysgit\bin>rebase.exe -b 0x50000000 msys-1.0.dll
For me solution was slightly different. 对我而言,解决方案略有不同。 It was 它是
C:\Program Files (x86)\Git\bin>rebase.exe -b 0x50000000 msys-1.0.dll
Before you rebase dlls, you should make sure it is not in use: 在重新确定dll的基础之前,应确保未使用它:
tasklist /m msys-1.0.dll
And make a backup: 并进行备份:
copy msys-1.0.dll msys-1.0.dll.bak
If the rebase command fails with something like: 如果rebase命令失败并显示类似以下内容:
ReBaseImage (msys-1.0.dll) failed with last error = 6 ReBaseImage(msys-1.0.dll)失败,最后一个错误= 6
You will need to perform the following steps in order: 您需要按顺序执行以下步骤:
- Copy the dll to another directory 将dll复制到另一个目录
- Rebase the copy using the commands above 使用上面的命令对副本进行重新设置
- Replace the original dll with the copy. 用副本替换原始dll。
If any issue run the commands as Administrator 如果有任何问题,请以管理员身份运行命令