安装命令
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
错误提示及解决:
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
出现这个错误的原因是项目太久,tag资源文件太大。解决办法:$ git config --global http.postBuffer 524288000
出现Warning:/usr/local/bin is not in your PATH
此时使用brew命令,会提示:-bash: brew: command not found
解决方式如下:
- $ sudo vim .bash_profile
- 添加 export PATH=/usr/local/bin:$PATH
- 保存
- source .bash_profile 使配置修改生效。
- 重新启动终端
再次使用brew 命令就ok了。