git - Homebrew 在安装过程中无法链接 Git

标签 git homebrew

我似乎无法弄清楚这一点。 Homebrew 在安装过程中无法链接 git。这是终端吐出的内容:

==> Downloading http://git-core.googlecode.com/files/git-1.8.4.tar.gz
Already downloaded: /Library/Caches/Homebrew/git-1.8.4.tar.gz
==> make prefix=/usr/local/Cellar/git/1.8.4 sysconfdir=/usr/local/etc CC=cc CFLA
==> make CC=cc CFLAGS= LDFLAGS=
==> make clean
==> make CC=cc CFLAGS= LDFLAGS=
==> Downloading http://git-core.googlecode.com/files/git-manpages-1.8.4.tar.gz
Already downloaded: /Library/Caches/Homebrew/git-manpages-1.8.4.tar.gz
==> Downloading http://git-core.googlecode.com/files/git-htmldocs-1.8.4.tar.gz
Already downloaded: /Library/Caches/Homebrew/git-htmldocs-1.8.4.tar.gz
==> Caveats
The OS X keychain credential helper has been installed to:
  /usr/local/bin/git-credential-osxkeychain

The 'contrib' directory has been installed to:
  /usr/local/share/git-core/contrib

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completion has been installed to:
  /usr/local/share/zsh/site-functions
Warning: Could not link git. Unlinking...
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link git'

Possible conflicting files are:
/usr/local/share/git-core/templates/info/exclude -> /Applications/GitHub.app/Contents/Resources/git/share/git-core/templates/info/exclude
/usr/local/share/git-core/templates/hooks/update.sample -> /Applications/GitHub.app/Contents/Resources/git/share/git-core/templates/hooks/update.sample
/usr/local/share/git-core/templates/hooks/prepare-commit-msg.sample -> /Applications/GitHub.app/Contents/Resources/git/share/git-core/templates/hooks/prepare-commit-msg.sample
/usr/local/share/git-core/templates/hooks/pre-rebase.sample -> /Applications/GitHub.app/Contents/Resources/git/share/git-core/templates/hooks/pre-rebase.sample
/usr/local/share/git-core/templates/hooks/pre-push.sample -> /Applications/GitHub.app/Contents/Resources/git/share/git-core/templates/hooks/pre-push.sample
/usr/local/share/git-core/templates/hooks/pre-commit.sample -> /Applications/GitHub.app/Contents/Resources/git/share/git-core/templates/hooks/pre-commit.sample
/usr/local/share/git-core/templates/hooks/pre-applypatch.sample -> /Applications/GitHub.app/Contents/Resources/git/share/git-core/templates/hooks/pre-applypatch.sample
/usr/local/share/git-core/templates/hooks/post-update.sample -> /Applications/GitHub.app/Contents/Resources/git/share/git-core/templates/hooks/post-update.sample
/usr/local/share/git-core/templates/hooks/commit-msg.sample -> /Applications/GitHub.app/Contents/Resources/git/share/git-core/templates/hooks/commit-msg.sample
/usr/local/share/git-core/templates/hooks/applypatch-msg.sample -> /Applications/GitHub.app/Contents/Resources/git/share/git-core/templates/hooks/applypatch-msg.sample
/usr/local/share/git-core/templates/description -> /Applications/GitHub.app/Contents/Resources/git/share/git-core/templates/description
==> Summary
🍺  /usr/local/Cellar/git/1.8.4: 1339 files, 30M, built in 16 seconds

我试过运行:

brew link git

以及卸载和重新安装。 我的/etc/paths 文件目前如下:

/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin

有什么线索吗? 哦,我还安装了 GitHub 的 Mac 应用程序(如果这很重要?)

最佳答案

看起来与 GitHub 的应用程序有冲突。我会删除它,你不需要它。

与我交谈过的几个人说它有点问题,你最好只使用终端(我同意)。

编辑:brew update brew upgrade 后跟 brew doctor 可能会提供更多线索。

关于git - Homebrew 在安装过程中无法链接 Git,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18676241/

相关文章:

linux - python setup.py egg_info"失败,错误代码为 1 in/tmp/pip-build-zsm7incx/phonenumbers/- 失败

homebrew - MacPorts 和 Brew 出现 "Trace/BPT trap: 5"错误

python - MacOS 构建问题 lstdc++ not found while building python package

macos - 尝试安装 Homebrew 时出现库未加载错误 (libidn.11.dylib)

git - 从多个远程跟踪或 pull

git - 使用 Git 时出现 Permission denied (publickey) 错误?

GitHub OAuth2 token : How to restrict access to read a single private repo

java - Play Framework 2.2 子项目

Homebrew 安装卡在 "Receiving objects"上

macos - 在 Mac 上覆盖系统 vim