首先,了解下homebrew是什么?

请看官网https://brew.sh/index_zh-cn.html

安装homebrew:

直接打开mac的终端,在终端中粘贴执行以下命令

/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       

  然后在重新执行brew安装命令即可   

Mac上安装homebrew的心酸历程

 

出现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了。

 

  




相关文章:

  • 2022-12-23
  • 2021-06-12
  • 2021-11-23
  • 2021-08-22
  • 2021-12-03
  • 2022-02-12
  • 2022-01-20
猜你喜欢
  • 2021-07-14
  • 2021-11-09
  • 2021-08-21
  • 2022-12-23
  • 2021-08-20
  • 2022-12-23
相关资源
相似解决方案