Unable to use symlink share / git -core / contrib / usr / local / share / git -core not writable

I really tried and used any recommendations for repairing, removing everything, reinstalling, etc., but the solution does not work. I am completely stuck and need help to find a solution! Thanks in advance, Christoph

MacBook-2:~ MyUserName$ brew install git Warning: git-2.1.3 already installed, it 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. 
+6
source share
2 answers

This is probably a rights issue.

Try

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

or, if you need it only on the git -core path,

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

may be enough.

Then run

 brew link git 

again.

+22
source

Perhaps you are using sudo to install an application earlier, so the owner of the dictionary /usr/local/share/ and /usr/local/lib will become root

mileage:

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

and then run:

 brew link git 
+9
source

Source: https://habr.com/ru/post/978115/


All Articles