【发布时间】:2018-08-07 10:36:55
【问题描述】:
尝试使用
在我的 Mac 系统 (High Sierra 10.13.3) 上更新git
brew install git
给出输出
$ brew install git
==> Downloading https://homebrew.bintray.com/bottles/git-2.16.2.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring git-2.16.2.high_sierra.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink share/man/man5/gitattributes.5
/usr/local/share/man/man5 is not writable.
You can try again using:
brew link git
==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
zsh completions and functions have been installed to:
/usr/local/share/zsh/site-functions
Emacs Lisp files have been installed to:
/usr/local/share/emacs/site-lisp/git
==> Summary
???? /usr/local/Cellar/git/2.16.2: 1,496 files, 34.5MB
但是,您可以看到brew link 步骤存在问题。尝试通过运行来修复它
brew link git
brew link --overwrite git
brew link --force git
给出同样的错误
Linking /usr/local/Cellar/git/2.16.2...
Error: Could not symlink share/man/man5/gitattributes.5
/usr/local/share/man/man5 is not writable.
有人也遇到过这个问题并设法解决了吗?
Mac 的用户和组
输出
【问题讨论】:
-
可能正在运行
brew reinstall git? -
你试过我的解决方案了吗?
-
@evolutionxbox 收到同样的错误
-
这可能是因为系统完整性保护,但通常它不应该保护
/usr/local尝试使用this answer停用它并在更改权限后重新激活它。
标签: git macos github homebrew atlassian-sourcetree