使用自制软件安装 git 时遇到问题。尝试了所有可用的过去解决方案。我确实对 /usr/local 有写权限。我可以毫无问题地进行 brew update 和 brew doctor ,但它说我已经安装了 git-git (无论是什么)。我有 oh-my-zsh shell。如果可能相关,我已经安装了带有 git 和 atom 的 xcode。
Last login: Tue Feb 24 09:56:18 on console
You have new mail.
# user at mymac in ~ [9:57:48]
$ brew install git
Error: git-git already installed
To install this version, first `brew unlink git'
# user at mymac in ~ [9:57:54]
$ brew unlink git
Error: No such keg: /usr/local/Cellar/git
# user at mymac in ~ [9:58:04]
$ brew update
Updated Homebrew from b33e8a75 to cf5325ac.
==> New Formulae
deisctl gcovr pdf-redact-tools
==> Updated Formulae
activemq couchdb-lucene hamsterdb libgadu redpen
avian datomic httpie libmpdclient unittest
berkeley-db gtk-gnutella ice mysql
cctools h2o ipsumdump mysql-cluster
# user at mymac in ~ [10:01:04]
$ brew doctor
Your system is ready to brew.
# user at mymac in ~ [10:01:25]
$ brew install git
Error: git-git already installed
To install this version, first `brew unlink git'
# user at mymac in ~ [10:01:30]
$ brew unlink git
Error: No such keg: /usr/local/Cellar/git
# user at mymac in ~ [10:01:35]
$ brew link git
Error: No such keg: /usr/local/Cellar/git
# user at mymac in ~ [10:01:44]
$ git --version
zsh: command not found: git
# user at mymac in ~ [10:02:01]
$ brew --version
0.9.5
# user at mymac in ~ [10:06:17]
$ git-git --version
zsh: command not found: git-git
# user at mymac in ~ [10:11:32]
$ which git-git
git-git not found
更新:我尝试将 shell 改回 bash。同样的问题。
mymac:~ user$ git --version
-bash: git: command not found
mymac:~ user$ brew install git
Error: git-git already installed To install this version, first `brew unlink git'
mymac:~ user$ –
忘了提我正在使用优胜美地 10.10.2