安装homebrew报错curl:

来自: https://www.jianshu.com/p/68e... 的解决方案已经out-of-date, 我按照相同的办法后仍然会出现443 Connection refused的error

image.png
我又从新去检查了一下博主所参考的原stackoverflow文章: stackoverflow原提image.pnggit

博主所参考的是目前高赞第一的答案,最初来自于2015年。已通过时, 我一直看到最后一个答案,才解决了个人问题,我将其搬运翻译过来github

The accepted Answer is outdated now. But based on the answer I solved the problem by:bash

1. open the home page of brew https://brew.sh/spa

2. copy the URL from the install cmd and open it on your browser https://raw.githubusercontent.com/Homebrew/install/master/install.sh翻译

3. right-click and save it to your computer3d

4. open a terminal and run it with: /bin/bash path-to/install.shblog

总结来讲,  直接进入这个连接https://raw.githubusercontent.com/Homebrew/install/master/install.sh , 右键保存网页, 找到你保存的位置, bash install.shhomebrew

这个方法解决了个人问题,虽然下载速度慢了一点rem

那么速度慢主要是由于要从github clone代码下来, 这个问题解决的方法在网上搜索的话, 最多的一种办法也是没有用处的,就是修改hosts文件,如今已经没有用了。  我的比较推荐另一种。 就是把代码转移到码云上gitee.com, 而后从gitee clone就很快, 可是这个方法不能解决咱们今天的问题, 除非你本身手动修改 install.sh里github的地址为gitee的地址。terminal

还有另一种其实很是简单的办法,  来自知乎的答案, 只须要简单的设置proxy就能够了

export ALL_PROXY=socks5://127.0.0.1:1080