Mac平台出现brew command not found
程序员文章站
2022-07-12 13:18:54
...
mac 终端下,执行以下命令,即可
- 安装brew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- 在终端环境下,查看brew的版本
- 也可以验证brew是否安装成功
brew --version
遇到报错
Error: Failure while executing; `git clone https://github.com/Homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1` exited with 128.
Error: Failure while executing; `/usr/local/bin/brew tap homebrew/core` exited with 1.
解决
// 执行下面这句命令,更换为中科院的镜像:
git clone git://mirrors.ustc.edu.cn/homebrew-core.git/ /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1
// 把homebrew-core的镜像地址也设为中科院的国内镜像
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
// 更新
brew update
//检查安装
brew --version
推荐阅读
-
centos7: ifconfig出现command not found解决办法
-
mac command not found: adb(mac电脑配置Android环境变量)
-
mac安装appium时执行appium-doctor命令提示command not found: appium-doctor
-
Mac 执行 gulp 报错 -zzh: gulp: command not found
-
iterm2出现pyenv:11: command not found: pyenv,prompt_status:5: command not found: wc
-
mac ls: command not found的问题与解决
-
Centos 执行命令出现 bash:$'\r': command not found
-
Mac平台出现brew command not found
-
zsh 中 command not found:brew
-
最新brew安装nvm报nvm command not found解决方案