安装套件管理工具-Homebrew

 

官网地址:https://brew.sh/

homebrew安装 --macOS 10.12

 

  

安装指令:

2.终端安装Homebrew

  a. 终端输入上面获取的安装指令 

homebrew安装 --macOS 10.12

 如果访问报错curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

 可查看安装homebrew报错 curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

       

       b. 点击return (enter)

 

 

 

homebrew安装 --macOS 10.12

 

一般 Downloading and installing Homebrew... 会卡一会儿,

然后 Receiving objects:  会卡很长时间...(可以通过置DNS为8.8.8.8  可以提高速度。由于本身网速不好的原因,还是花了3小时的时间下载)

 

若觉得下载太慢,可在终端设置端口:export ALL_PROXY=socks5://127.0.0.1:portnumber 这样可以加快终端下载速度。portnumber取决于自己电脑的端口(1086)(该操作没有试过) 

 

如果 安装homebrew报错 error: RPC failed; curl 18 transfer closed with outstanding read data remaining

主要是因为需要读取的数据还没有完成,但是传输数据的连接被关闭了导致的。

 

 

3. 验证安装成功

  输入 brew help

  然后, 

  输入指令:brew doctor 

  输入上面指令时看不到输入的内容

homebrew安装 --macOS 10.12

 

 --------------------------------------------------------

---由于上面操作完,homebrew可正常使用,所以下面的操作没有试过----

---------------------------------------------------------

编辑vim

sudo vim /etc/profile

按 i 进入编辑,添加

BREW_HOME="/usr/local/bin"

结束 按ese 输入 :wq 保存退出

相关文章:

  • 2021-10-09
  • 2021-07-18
  • 2022-01-16
  • 2021-06-04
  • 2021-10-08
  • 2022-02-08
  • 2022-12-23
猜你喜欢
  • 2021-07-02
  • 2021-04-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-24
相关资源
相似解决方案