export ALL_PROXY=socks5://127.0.0.1:1086
举例:
export ALL_PROXY=socks5://127.0.0.1:1086 brew install cmake
详见:
【已解决】mac中给brew设置代理加速下载和更新