gpt4 book ai didi

git - 找不到 Homebrew 安装的应用程序

转载 作者:太空狗 更新时间:2023-10-29 14:47:56 26 4
gpt4 key购买 nike

我刚刚在带有 Snow Lion 的新 Mac 上安装了 Homebrew 软件。 Mac 已经在/usr/bin/git 中安装了 git(大概是在我安装 Xcode 命令行工具时)。

无论如何我跑了:

$ brew install git

命令似乎运行成功,正在安装git:

/usr/local/Cellar/git/1.8.1.5/bin/git

但是在终端中,我得到的是旧的 git,而不是 homebew git:

$ which git
/usr/bin/git

我错过了什么?我需要在/usr/local/Cellar/git/1.8.1.5/bin 我的 PATH 前面加上吗?谢谢。

最佳答案

Brew Doctor 助您一臂之力

$ brew doctor
Warning: /usr/bin occurs before /usr/local/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. The following tools exist at both paths:

git
git-cvsserver
git-receive-pack
git-shell
git-upload-archive
git-upload-pack

Consider amending your PATH so that /usr/local/bin
occurs before /usr/bin in your PATH.

关于git - 找不到 Homebrew 安装的应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15172076/

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