Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Homebrew can’t link Git during the installation

Tags:

git

homebrew

I can’t seem to figure this out. Homebrew can’t link git during the installation. Here’s what Terminal spits out:

==> 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

I’ve tried running:

brew link git

As well as uninstalling and reinstalling. My /etc/paths file is currently as follows:

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

Any clue? Oh, I also have GitHub’s Mac app installed (if that matters?)

like image 814
Perry Azevedo Avatar asked Sep 07 '13 17:09

Perry Azevedo


1 Answers

It looks like there's a conflict with GitHub's app. I would remove it, you don't need it.

A few people I spoke with about it said it was kind of buggy and that you're better off just using the terminal (which I agree with).

edit: brew update brew upgrade followed by brew doctor might give more clues.

like image 96
Nikola Avatar answered Oct 02 '22 14:10

Nikola