Git 分段错误:11

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23448318/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 10:00:45  来源:igfitidea点击:

Git Segmentation fault: 11

macosgit

提问by user3476345

I had to reinstall OS X Lion on my Macbook Pro, and upon trying to use git I got an error stating Segmentation fault: 11. No matter what git command I try I get that error. I'm just doing this through the Mac terminal. No fancy programs or anything external.

我不得不在我的 Macbook Pro 上重新安装 OS X Lion,并且在尝试使用 git 时出现错误,指出Segmentation fault: 11. 无论我尝试什么 git 命令,我都会收到该错误。我只是通过 Mac 终端执行此操作。没有花哨的程序或任何外部的东西。

I uninstalled git and just to make sure it was uninstalled I typed git initand it gave me a command not found message.

我卸载了 git,只是为了确保它已被卸载,我输入了git init它,它给了我一条未找到命令的消息。

I reinstalled git and I'm still getting the segmentation fault message. I get the message regardless of what directory I'm in and what command I use.

我重新安装了 git,但仍然收到分段错误消息。无论我在哪个目录中以及我使用什么命令,我都会收到消息。

回答by user3476345

I got it to work by uninstalling it again and installing 1.8.1 instead of 1.9.2. I guess OS X Lion doesn't like the latest release.

我通过再次卸载它并安装 1.8.1 而不是 1.9.2 让它工作。我猜 OS X Lion 不喜欢最新版本。

回答by Owen Pragel

Try setting an email address in your git config if you haven't done so already - traced errors and that's what fixed it for me.

如果您还没有这样做,请尝试在您的 git 配置中设置电子邮件地址 - 跟踪错误,这就是为我修复它的原因。

git config --global user.email "[email protected]"

git config --global user.email "[email protected]"

回答by Merlin

Working with a Mac OS X Version 10.7.5 (Lion)

与一个 Mac OS X Version 10.7.5 (Lion)

Uninstalling Git latest version (2.2.0)and reinstalling Git version 1.8.4.2worked for me. Here is the download linkfor git 1.8.4.2

卸载Git latest version (2.2.0)和重新安装 Git version 1.8.4.2对我有用。这里是下载链接git 1.8.4.2

It says snow-leopardbut actually works for Lionhere is the page with all git-osx-installer

它说snow-leopard但实际上适用于Lion所有git-osx-installer 的页面

:o)

:o)

回答by MrSingh

I had the same problem, I was using (2.12.2)on Windows 7(x64), I downgraded it to (2.12.1)and now everything is working fine.

我遇到了同样的问题,我(2.12.2)在 Windows 7(x64) 上使用,我将其降级到(2.12.1)现在一切正常。