本人在安装brew时遇到一下问题:
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
尝试各种方法,包括stackoverflow上的解决方案,终于经过了各种失败后,找到解决办法。
输入指令sudo gem install redis,再输入安装brew指令即可。
allisondeMacBook-Pro:~ allison$ sudo gem install redis
Password:
Fetching redis-4.1.3.gem
Successfully installed redis-4.1.3
Parsing documentation for redis-4.1.3
Installing ri documentation for redis-4.1.3
Done installing documentation for redis after 1 seconds
1 gem installed
allisondeMacBook-Pro:BDFCountyEdit allison$
再次执行安装brew的命令
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
allisondeMacBook-Pro:~ allison$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> The following existing directories will be made group writable:
/usr/local/bin
==> The following existing directories will have their owner set to allison:
/usr/local/bin
==> The following existing directories will have their group set to admin:
/usr/local/bin
==> The following new directories will be created:
/usr/local/etc
/usr/local/include
/usr/local/lib
/usr/local/sbin
/usr/local/share
/usr/local/var
......
remote: Enumerating objects: 47, done.
remote: Counting objects: 100% (47/47), done.
remote: Compressing objects: 100% (43/43), done.
Receiving objects: 7% (9301/129532), 3.64 MiB | 168.00 KiB/s
Checking out files: 100% (5116/5116), done.
Tapped 2 commands and 4881 formulae (5,141 files, 12.8MB).
Already up-to-date.
==> Installation successful!
==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
https://docs.brew.sh/Analytics
......
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
https://github.com/Homebrew/brew#donations
==> Next steps:
- Run `brew help` to get started
- Further documentation:
https://docs.brew.sh
allisondeMacBook-Pro:BDFCountyEdit allison$
OVER,当你看到Installation successful!
的时候,安装完成。