当我运行brew doctor时,这是我首先得到的错误:
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
git
我已经尝试过的事情:我也尝试放brew link git
,我得到了这个错误:
Error: Could not symlink share/git-core/contrib
/usr/local/share/git-core is not writable.
我尝试使用brew link --overwrite git
,结果是:
Error: Could not symlink share/git-core/contrib
/usr/local/share/git-core is not writable.
我尝试使用brew upgrade
,brew update
,但没有任何反应。
而不是使用 Homebrew 安装 git,请下载适用于 Mac 的官方 git-scm 并安装它。
它应该"覆盖"有问题的链接并正确安装 git。