2014-11-12 15 views
6

Naprawdę próbowałem i użyłem jakiejkolwiek sugestii, od naprawy, poprzez odinstalowanie wszystkiego, po reinstalację itp., Ale bez rozwiązania Prace. Całkowicie utknąłem i potrzebuję pomocy, aby znaleźć rozwiązanie! Z góry dzięki, ChristophNie można utworzyć dowiązania symbolicznego share/git-core/contrib/usr/local/share/git-core nie jest zapisywalny

MacBook-2:~ MyUserName$ brew install git 
Warning: git-2.1.3 already installed, it's just not linked 
MacBook-2:~ MyUserName$ brew destroy git 
Error: Unknown command: destroy 
MacBook-2:~ MyUserName$ brew uninstall git 
Uninstalling /usr/local/Cellar/git/2.1.3... 
MacBook-2:~ MyUserName$ brew install git 
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/git- 2.1.3.yosemite.bottle.tar.gz 
Already downloaded: /Library/Caches/Homebrew/git-2.1.3.yosemite.bottle.tar.gz 
==> Pouring git-2.1.3.yosemite.bottle.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 
Error: The `brew link` step did not complete successfully 
The formula built, but is not symlinked into /usr/local 
Could not symlink share/git-core/contrib 
/usr/local/share/git-core is not writable. 

You can try again using: 
brew link git 
==> Summary 
    /usr/local/Cellar/git/2.1.3: 1342 files, 32M 
MacBook-2:~ MyUserName$ brew link git 
Linking /usr/local/Cellar/git/2.1.3... 
Error: Could not symlink share/git-core/contrib 
/usr/local/share/git-core is not writable. 

Odpowiedz

21

Jest to prawdopodobnie błąd związany z uprawnieniami.

Spróbuj

sudo chown -R $(whoami) /usr/local/share/ 

lub, jeśli tylko trzeba to na ścieżce git-core,

sudo chown -R $(whoami) /usr/local/share/git-core 

może być za mało.

Następnie uruchom

brew link git 

ponownie.

+0

Dzięki, ale to też nie pomaga ... Terminal mówi mi wtedy: Chris tophs-MacBook-2: ~ AWChristoph $ brew link git Błąd: Brak takiej keg:/usr/local/Cellar/git – AWChristoph

+0

Wygląda na to, że jest tam ten sam problem. Zrób 'sudo chown -R $ (whoami)/usr/local/Cellar /'. – mattias

+0

@AWChristoph: Czy ta pomoc? – mattias

9

Może użyć sudo aby przed zainstalowaniem niektórych aplikacji, więc właściciel słownika /usr/local/share/ i /usr/local/lib stać root

Run:

sudo chown -R $(whoami) /usr/local/share/ 

sudo chown -R $(whoami) /usr/local/lib 

a następnie uruchomić:

brew link git 
+0

Powiedział mi: Nie ma takiej beczki:/usr/local/Cellar/git –