转载自: https://www.logcg.com/archives/1617.html
在终端中输入如下代码:export ALL_PROXY=socks5://127.0.0.1:1080
如果说你想要 brew 永久如此,我们就需要将环境变量写入终端的配置当中,这取决于你的终端,如果是默认的 bash,则写入 ~/.bash_profile ,如果是 zsh,则写在 ~/.zshrc 里。
echo export ALL_PROXY=socks5://127.0.0.1:1080 >> ~/.bash_profile
//如果是zsh就下边这个
echo export ALL_PROXY=socks5://127.0.0.1:1080 >> ~/.zsh_profile
最后别忘记要source下这个profile文件.
网友评论