安装homebrew报错汇总

一、安装brew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

二、提示报错1

curl: (7) Failed to connect to raw.githubusercontent.com port 443: Operation timed out

1、先在浏览器输入这个地址:

https://raw.githubusercontent.com/Homebrew/install/master/install
 

看是否能打开,不能打开就是你网络有问题,不要问我哦~

把这个网页保存名为 brew_install.rb 的文件,保存的位置你随便,只要自己能找到。

2、则在终端输入curl

// 输入
curl

// 提示
curl: try 'curl --help' or 'curl --manual' for more information

这样就没错,要是报错,那我就不知道了!

3、然后在终端进入存放这个文件的目录

ruby brew_install.rb

然后等安装homebrew吧!

三、提示报错2

fatal: unable to access 'https://github.com/Homebrew/brew/': Could not resolve host: github.com
Failed during: git fetch origin master:refs/remotes/origin/master --tags --force

1、试着先在终端 ping github.com

MacBook-Pro:~$ping github.com 
PING github.com (192.30.252.131): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3

如果 ping 出来是这种结果,就接着看第二步

2、修改hosts

1)在终端中 sudo vi /etc/hosts 打开编辑文件

2)下面添加 192.30.253.113  github.com

3)保存退出

3、在终端 ping github.com

就会发现已经成功了

4、继续执行上边的安装命令即可~

四、提示报错3

error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
fatal: The remote end hung up unexpectedly

网络有问题,在执行一下安装命令

/usr/bin/ruby -e "$(curl -      fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

到这基本就?了~~~

 

五、提示报错4

Mac 下安装 brew Warning: /usr/local/bin is not in your PATH.

https://blog.csdn.net/spirit_8023/article/details/85126081

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值