git Github/Cygwin 错误:检测到 cygheap 碱基不匹配
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/34959583/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Github/Cygwin error: cygheap base mismatch detected
提问by Marcus Gosselin
Git has been giving me this error
Git一直给我这个错误
0 [main] sh (47116) C:\Users\Marcus\AppData\Local\GitHub\PortableGit_c7e0cbde92ba565cb218a521411d0e854079a28c\usr\bin\sh.exe: *** fatal error - cygheap base mismatch detected - 0x11C7400/0x1297400.
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] sh 42052 fork: child -1 - forked process 47116 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
/mingw32/libexec/git-core/git-sh-setup: fork: retry: No child processes
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] sh 42052 fork: child -1 - forked process 47116 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
/mingw32/libexec/git-core/git-sh-setup: fork: retry: No child processes
Things I've tried include:
我尝试过的事情包括:
- deleting cygwin from
C:\cygwin
andC:\cygwin64
and reinstalling - reinstalling github using the uninstaller and installer.
- uninstalling github and manually removing its local and roaming appdata folders, and reinstalling.
- rebooting the computer
- rebasing
C:\cygwin
, it succeeded, but didnt fix any issues. - rebasing
%appdata%\Local\Github\PortableGit_c7e...\.
it returned the original error again.
- 从
C:\cygwin
和 中删除 cygwinC:\cygwin64
并重新安装 - 使用卸载程序和安装程序重新安装 github。
- 卸载 github 并手动删除其本地和漫游 appdata 文件夹,然后重新安装。
- 重新启动计算机
- rebase
C:\cygwin
,它成功了,但没有解决任何问题。 - 重新调整
%appdata%\Local\Github\PortableGit_c7e...\.
它再次返回原始错误。
for reference, I'm running windows 10 64 bit. The only other question I could find that pin pointed the error I'm getting never reached a solution: link here
作为参考,我正在运行 Windows 10 64 位。我能找到的唯一另一个问题是该引脚指出了我从未找到解决方案的错误:链接在这里
I'm not sure where else to go aside from just reinstalling windows altogether, any help would be greatly appreciated.
我不确定除了完全重新安装 Windows 之外还有什么地方可以帮助,我们将不胜感激。
采纳答案by VonC
The shell from git-for-windows(based on msys2) is not meant to be run in Cygwin or a different install of msys2.
来自git-for-windows(基于 msys2)的 shell并不意味着在 Cygwin 或不同的 msys2 安装中运行。
GitHub Desktopuses an old git-for-windows (2.5.3, Sept. 2015)
GitHub Desktop使用旧的 git-for-windows(2.5.3,2015 年 9 月)
For a git bash session, you do not need Cygwin or GitHub Desktop.
对于 git bash 会话,您不需要 Cygwin 或 GitHub Desktop。
Uncompress the latest git-for-windows azrchive you can find:
解压您可以找到的最新 git-for-windows azrchive:
PortableGit-2.7.0-64-bit.7z.exe
=>c:\prgs\git\PortableGit-2.7.0-64-bit
PortableGit-2.7.0-64-bit.7z.exe
=>c:\prgs\git\PortableGit-2.7.0-64-bit
Then:
然后:
cd c:\prgs\git
mklink /J latest PortableGit-2.7.0-64-bit
set GIT_ROOT=c:\prgs\git\latest
set PATH=%PATH%;%GIT_ROOT%;%GIT_ROOT%\bin;%GIT_ROOT%\cmd;%GIT_ROOT%\us`\bin
You will then be able to type git-bash
to launch a linux-based bash session.
然后,您将能够键入git-bash
以启动基于 linux 的 bash 会话。
Or, from a regular CMD
shell session, you will have access to 200+ unix commands (curl
, cat
, xargs
, ls
, ...).
No need for Cygwin.
或者,从常规的CMD
shell 会话中,您将可以访问 200 多个 unix 命令(curl
、cat
、xargs
、ls
、 ...)。
不需要 Cygwin。
回答by pentaadrian
Disable Force randomization for images (mandatory ASLR)in your system's Windows Defender Security Center. Or exclude ASLR for git executables:
在系统的 Windows Defender 安全中心禁用图像的强制随机化(强制 ASLR)。或者排除 git 可执行文件的 ASLR:
Get-Item -Path "C:\Program Files\Git\usr\bin\*.exe" | %{ Set-ProcessMitigation -Name $_.Name -Disable ForceRelocateImages }
回答by goamn
Rebooting fixed it for me. I probably got this error because of upgrading Git for Windows. Try rebooting before doing any of the other crazy things!
重新启动为我修复了它。我可能因为为 Windows 升级 Git 而收到此错误。在做任何其他疯狂的事情之前尝试重新启动!
回答by Jakob Ziegler
I had a very similar problem, but neither restarts nor reinstalling git or cygwin helped. I always got:
我有一个非常相似的问题,但重新启动或重新安装 git 或 cygwin 都没有帮助。我总是得到:
1 [main] sh (12220) C:\Program Files\Git\usr\bin\sh.exe: *** fatal error - cygheap base mismatch detected - 0x37C7408/0x38E7408.
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] sh 6928 fork: child -1 - forked process 12220 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
C:\Program Files\Git\mingw64/libexec/git-core\git-stash: fork: retry: Resource temporarily unavailable
Took me a while to figure out that it started after I read about a windows bug related to "System-wide mandatory ASLR", and how the settings available via Windows UI weren't setting the proper registry keys. After making my system more secure by adding this registry entry, cygwin forking broke:
我花了一段时间才发现它是在我阅读了与“系统范围的强制 ASLR”相关的 Windows 错误以及通过 Windows UI 可用的设置如何没有设置正确的注册表项之后启动的。通过添加此注册表项使我的系统更安全后,cygwin 分叉失败了:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\kernel]
"MitigationOptions"=hex:00,01,01,00,00,00,00,00,00,00,00,00,00,00,00,00
Source: Clarifying the behavior of mandatory ASLR
That resulted in git-stash not working anymore, nor cygwin working (which I installed later. Removing that registry key again fixed the issue.
这导致 git-stash 不再工作,cygwin 也不再工作(我稍后安装。再次删除该注册表项解决了该问题。
回答by rogerdpack
OK for me a similar error ffmpeg $ ./configure
...
对我来说类似的错误ffmpeg $ ./configure
...
License: LGPL version 2.1 or later
Creating config.mak, config.h, and doc/config.texi...
1 [main] cmp (5984) C:\Program Files\Git\usr\bin\cmp.exe: *** fatal error - cygheap base mismatch detected - 0x180326400/0x180330400.
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.
meant "you are trying to build using MSYS2 but accidentally failing over to some git distributed cmp.exe files, which are apparently unuseable" (see VonC's answer).
意味着“您正在尝试使用 MSYS2 进行构建,但不小心将故障转移到了一些 git 分布式 cmp.exe 文件,这些文件显然无法使用”(请参阅 VonC 的回答)。
Fix in my case: install them into MSYS2 proper:
在我的情况下修复:将它们正确安装到 MSYS2 中:
$ pacman -S make
$ pacman -S diffutils # for cmp package
回答by righere
some packages in MSYS2 you installed is in conflict with x:\cygwin\bin,so just delete MSYS2 PATH in system environment
你安装的MSYS2中有些包和x:\cygwin\bin有冲突,删除系统环境中的MSYS2 PATH即可