gpt4 book ai didi

git - 无法符号链接(symbolic link) share/git-core/contrib/usr/local/share/git-core 不可写

转载 作者:IT王子 更新时间:2023-10-29 00:39:20 24 4
gpt4 key购买 nike

我真的尝试过并使用了从修复、卸载所有内容到重新安装等所有建议,但没有任何解决方案有效。我完全陷入困境,需要帮助才能找到解决方案!提前致谢,克里斯托夫

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.

最佳答案

这可能是与权限相关的错误。

尝试

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

或者,如果你只需要在 git-core 路径上使用它,

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

可能就足够了。

然后运行

brew link git

再次。

关于git - 无法符号链接(symbolic link) share/git-core/contrib/usr/local/share/git-core 不可写,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26898269/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com