Mac 版 Git 无法启动:“非法指令”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22892890/
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
Git for Mac fails to launch: "illegal instruction"
提问by agentv
...I've looked pretty carefully (I believe), and have been unsuccessful at getting an installation of Git for my Mac.
...我已经很仔细地看了(我相信),但没有成功为我的 Mac 安装 Git。
For various reasons, I'm running 10.6.8 of Mac OS X and will not be changing that anytime soon.
出于各种原因,我正在运行 Mac OS X 10.6.8 并且不会很快改变它。
I've already gathered and installed the bundle exposed here:
我已经收集并安装了这里公开的包:
https://help.github.com/articles/set-up-git
https://help.github.com/articles/set-up-git
The installation instructions are pretty clear, and it's obvious to me that the package installed. But any attempts to use the git client from the command line result in an "Illegal Instruction" error.
安装说明非常清楚,对我来说很明显安装了软件包。但是任何从命令行使用 git 客户端的尝试都会导致“非法指令”错误。
I've sifted pretty carefully through information available here:
我非常仔细地筛选了此处提供的信息:
http://git-scm.com/book/en/Getting-Started-Installing-Git
http://git-scm.com/book/en/Getting-Started-Installing-Git
There is another bundle that seems to be available. It is called "GitHub for Mac 1.7.5, but it appears to require Mac OS X 10.7 or later.
还有一个似乎可用的捆绑包。它被称为“GitHub for Mac 1.7.5,但它似乎需要 Mac OS X 10.7 或更高版本。
Has anyone else encountered this difficulty? Must I build from source?
有没有其他人遇到过这个困难?我必须从源代码构建吗?
I'm a couple of hours of reading and hacking into this effort? Is there something obvious that I've not considered?
我花了几个小时阅读和破解这项工作?有什么明显的东西我没有考虑过吗?
回答by harpersferry
Yes, I've had the same exact problem, and what I did is installed an earlier build from here: https://code.google.com/p/git-osx-installer/
是的,我遇到了同样的问题,我所做的是从这里安装了早期版本:https: //code.google.com/p/git-osx-installer/
I'm running 10.6.8 and installed the newest build there, 1.8.4.2
我正在运行 10.6.8 并在那里安装了最新版本 1.8.4.2
SourceForge only has 1.9.0 and 1.8.5.2 http://sourceforge.net/projects/git-osx-installer/reviews?source=navbar
SourceForge 只有 1.9.0 和 1.8.5.2 http://sourceforge.net/projects/git-osx-installer/reviews?source=navbar
Someone on the reviews said they had trouble with both and went back to 1.7. I would try that if 1.8.4.2 doesn't work.
评论中有人说他们在这两个方面都有问题并回到 1.7。如果 1.8.4.2 不起作用,我会尝试。
I was able to run the config commands without an illegal instruction error, at least.
至少,我能够在没有非法指令错误的情况下运行配置命令。
回答by Seth W. Klein
I had this problem and was able to install a working version using Homebrew.
我遇到了这个问题,并且能够使用Homebrew安装一个工作版本。
# first uninstall the broken version
# mount the DMG for the broken version using Finder
# "type" this with the tab key! it saves typing and fixes the version number
cd /Volumes/Git\ 2.0.1\ Snow\ Leopard\ Intel\ Universal/
./uninstall.sh
# make bash forget about the uninstalled binary
hash -r
cd
# now install the working version
# assumes you have Homebrew installed
brew install git
git version
回答by Polsonby
I had this today on Snow Leopard after running the suggested git installer from git-scm. Really horrible. Found that installing Macports using their old Snow Leopard packageand then
在从 git-scm 运行建议的 git 安装程序后,我今天在 Snow Leopard 上有了这个。真的很可怕。发现使用他们旧的 Snow Leopard 包安装 Macports然后
sudo port install git +svn +doc +bash_completion +gitweb
installs git plus its dependencies and git now works fine; version 1.9.3 installed and working on 10.6.8.
安装 git 及其依赖项,现在 git 工作正常;版本 1.9.3 已安装并在 10.6.8 上运行。
回答by Darryl Snow
I had the same problem. There are various methods for downloading and installing git - Try macports or homebrew. The thing that finally worked for me was having xcode 3.2.6 installed with the additional command line tools - version 3.2 that comes with the leopard install disk wasn't enough. You can install xcode etc. from the disk and then run software update to upgrade it to 3.2.6.
我有同样的问题。有多种下载和安装 git 的方法 - 尝试 macports 或 homebrew。最终对我有用的是使用额外的命令行工具安装 xcode 3.2.6 - leopard 安装盘附带的 3.2 版是不够的。您可以从磁盘安装 xcode 等,然后运行软件更新将其升级到 3.2.6。
回答by Melebius
The latest build for Snow Leopard in the official git-osx-installerrepo is Git 2.3.5currently. You can download it from http://sourceforge.net/projects/git-osx-installer/files/git-2.3.5-intel-universal-snow-leopard.dmg/downloadusing web browser. This installation works for me on OS X 10.6.8.
官方git-osx-installer 存储库中Snow Leopard 的最新版本目前是Git 2.3.5。您可以使用 Web 浏览器从http://sourceforge.net/projects/git-osx-installer/files/git-2.3.5-intel-universal-snow-leopard.dmg/download下载它。此安装适用于 OS X 10.6.8。
Or you can check yourself for a newer version:
http://sourceforge.net/projects/git-osx-installer/files/
或者您可以检查自己是否有更新版本:http:
//sourceforge.net/projects/git-osx-installer/files/
回答by paulyap
Yes - it seems that it does not support the older OS version (mine was 10.6.8). I upgraded to the newest Mac OS 10.9.4 (the installation will take a while), reinstalled the Git software (note that it will ask for xcode to be installed, which I proceeded), and everything works fine from there. Hope this helps.
是的 - 它似乎不支持旧的操作系统版本(我的是 10.6.8)。我升级到最新的 Mac OS 10.9.4(安装需要一段时间),重新安装 Git 软件(注意它会要求安装 xcode,我继续),然后一切正常。希望这可以帮助。
回答by staticVoidMan
Ref : https://help.github.com/articles/does-github-for-mac-run-on-os-x-10-6-snow-leopard
参考:https: //help.github.com/articles/does-github-for-mac-run-on-os-x-10-6-snow-leopard
To quote:
报价:
Does GitHub for Mac run on OS X 10.6 Snow Leopard?
No, GitHub for Mac requires OS X 10.7 (Lion) or higher.
We made this decision because the app relies on a number of technologies which are not available in Mac OS X 10.6 or earlier. We want to provide the best experience possible for the app's users, so we've made the choice to only support 10.7 and above, and not make earlier versions available.
GitHub for Mac 可以在 OS X 10.6 Snow Leopard 上运行吗?
否,Mac 版 GitHub 需要 OS X 10.7 (Lion) 或更高版本。
我们做出此决定是因为该应用程序依赖于 Mac OS X 10.6 或更早版本中不可用的许多技术。我们希望为应用程序的用户提供最佳体验,因此我们选择仅支持 10.7 及更高版本,而不提供早期版本。