2013-09-07 5 views
5

私はこれを理解できないようです。 Homebrewはインストール中にgitをリンクできません。ここでは、ターミナルが出してくれるものです:自作で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 /パスファイルが現在ある:

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

任意の手掛かり? ああ、GitHubのMacアプリもインストールされています(問題がある場合)

+0

を[この回答を参照してください](http://superuser.com/a/450207) にsudoのchown -R 'whoami'/usr/local – mmell

答えて

5

GitHubのアプリと競合しているようです。私はそれを削除します、あなたはそれを必要としません。

私が話したことのある人は、バグのようなものだと言っていて、ターミナル(私が同意する)を使いたほうが良いと言いました。

編集:brew updatebrew upgradeの後にbrew doctorが表示される場合があります。

+1

ありがとう、これが助けになりました。 Ran 'brew doctor'と呼ばれ、いくつかのフォルダに' chown'を使用するよう提案しました。それで、 'brew install git'をもう一度やってみてください! :) – Jonathan

0

建て式が、/usr/local

にシンボリックリンクされていないがでリンクを上書きしてみてください。

brew link --overwrite git 

それが影響し、どのファイルを参照する--dry-runを追加します。

このそれでも失敗する場合は、あなたの自作権限固定してみてください:

sudo chown -R $USER /usr/local/lib /usr/local/include /usr/local/bin /usr/local/Cellar 
関連する問題