Before we said,As the domestic network was further bad,use brew AlsoReplace domestic universities mirror source,But this method palliatives,An update is faster,But still the same download。
The result was the most updates need to download the source code and compiled locally,Luck almost altogether also download the source code is not down,Cancel every time and try again,Constantly repeated manual。
- If we can go proxy terminal command like。
Yes,You might think of what such proxychains-ng Such software,In fact, do not,Because the brew is a global proxy support,We only need to add the proxy configuration in the current environment to which。
Enter the following code in the terminal:
1 |
export ALL_PROXY=socks5://127.0.0.1:1080 |
If you want brew So permanent,We need to be written to the configuration environment variable among terminal,It depends on your terminal,If the default bash,Then write ~/.bash_profile ,If yes zsh,Then write ~/.zshrc in。
Or directly with the following statement to the commands directly into the configuration file,Thanks surveillance104 reminder Oh!
1 2 3 4 5 |
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 |
Such,Homebrew You can be updated by shadowsocks,Speed whizzing。:)
note
You should note,If you use this command,Most of the possible use of agents will end command (ping is not assured?) If some special command always fails direct,You should first thought may be to blame Agent;Other than that,brew can notBy proxyChina to use mirroring - the reason you want:)
Original article written by LogStudio:R0uter's Blog » Let go Homebrew Update Agent
Reproduced Please keep the source and description link:https://www.logcg.com/archives/1617.html
alias use_proxy=”env http_proxy=http://host:port https_proxy=http://host:port”
use_proxy brew update
This command set again as long as you can right now ...... I are directly Surge in point copy and paste commands and then go about ............
If you want to cancel the agent how to get?
Restart。
The same question,How to get canceled
1.$ vi ~/.curlrc add a line socks5:127.0.0.1:yours port
2.$curl ip.gs
check your real IP address
Surge has an option,是“copy shell export commond”。
Copy out the command "export https_proxy = http://127.0.0.1:The port number;export http_proxy=http://127.0.0.1:The port number",After the paste into the terminal where the agent still can not seem to,Why is that?
And bloggers your command "export ALL_PROXY = socks5://127.0.0.1:Port number "is possible,Why is this?
Which could explain the principles of trouble?
The above list may not say clear,With a surge in the instruction can not be proxy homebrew。
?Why nothing seems ♂️,Just can not。Some software he does not follow this rule does not read variables you temper。Like Python,I still do not understand it when to go and when not to go proxy agent ........................
First, you'll make sure your agent tools available,And is open。Ensure that local listening port is 1080,Not all agents are the tools of this port
10.12.5 According to the configuration method,Still no way to use
Do not forget to https。
very good! Solve a lot of problems!
Thanks
mac10.11.6 pro-test is invalid
Test
Ah ah ah
Retest
Two thousand two hundred twenty-two
Pocketed Hello classmates,I surveillance104
I introduce OS X installation zeronet tutorials posted when switching applications this Chinese mainland universities brew source post has signed off the grid if the students mind, I immediately delete the link words here: https://tr.im/LB9tH
Incidentally, if you want to once and for all, then you can directly input terminal:
echo export ALL_PROXY=socks5://127.0.0.1:1080 >> ~/.bash_profile
of course can! No problem! The handover source is not a good idea,Because most of the packages may still be downloaded from an overseas address,I am now also use the method you said -
In this way I wrote in another articleI also write to you this article:),but,If you use the Global Agent,We should not continue to use Chinese brew source,This is something you should pay attention to it:)非常 感謝! Barley
export ALL_PROXY=socks5://127.0.0.1:1080
?you are right……
consult:Run brew cask update error,How to solve it?
==> fatal: unable to access ‘https://github.com/caskroom/homebrew-cask/’: SSLRea
==> Error: Fetching /usr/local/Library/Taps/caskroom/homebrew-cask failed!
Already up-to-date.
fatal: unable to access ‘https://github.com/caskroom/homebrew-cask/’: SSLRead() return error -9806
Error: Fetching /usr/local/Library/Taps/caskroom/homebrew-cask failed!
git contaminated you Rom,See my article,You can use a proxy to update Let go Homebrew Update Agent