All Articles

How to Resolve Slowly Brew Update

Recently, I’ve found brew update is extremely slow no matter I was in the office or at home. To be honest, the network is not so good in China these days. So, here comes the solution.

  1. Set up a Socks5 proxy.
  2. Open the bask profile or .zshrc. I’m using ZSH, so:
vi $HOME/.zshrd
  1. Add the proxy and unproxy command into the file. For example, the socks5 URL is 127.0.0.1:1081.
alias proxy='export all_proxy=socks5://127.0.0.1:1081'
alias unproxy='unset all_proxy'
  1. Save and source $HOME/.zshrc

Now, use proxy && brew update && unproxy is resolved my problem.

Published Dec 9, 2019

Personal blog. I share frontend development technique and life.