Install Homebrew Slow On Mac

My computer develop environment

1
2
3
4
5
6
7
8
$ sw_vers 
ProductName: Mac OS X
ProductVersion: 10.12.6
BuildVersion: 16G29

$ brew -v
Homebrew 1.3.0
Homebrew/homebrew-core (git revision 83c2; last commit 2017-08-03)

Brew is a package manage on Mac.

Official installation brew method:

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

But sometimes, it is too slow that we can download this installation script

1
$ wget https://raw.githubusercontent.com/Homebrew/install/master/install

You can change the source:

1
$ vim install
1
2
3
#BREW_REPO = "https://github.com/Homebrew/brew".freeze
# Replace to
BREW_REPO = "git://mirrors.ustc.edu.cn/brew.git".freeze

Or using global proxy which is supported the socks proxy in brew

1
$ export ALL_PROXY=socks5://127.0.0.1:portnumber

Install

1
2
$ chmod +x install
$ ./install
Share