Use Brew to install software in Mac, download too slow what to do?
The software mentioned in this article refers to the larger software, if the software is small, such as software only a few m, then using this method, the promotion will be very small.
Learn about Brew principles:
1: 从网络下载安装包2: 执行一系列定义好的编译安装流程
The main cause of the problem:
Brew download is similar to the direct use of Web download, is a single-threaded download. Aside from the network, the mechanism itself cannot provide high-speed downloads. At the same time, network factors are the biggest problem.
Solution Ideas:
1:使用迅雷下载,下载速度提升N倍(5倍以上);如果使用迅雷会员,按现在民用网速来算,应该能达到2M每秒。2:将下载的文件移动到brew可识别的目录3:重新执行brew install XX
Concrete Operation Idea: (Take install go environment for example)
1: install go
The above command will prompt you to start downloading a file, but the progress is slow. Half an hour passed, only to 30%. Copy the download link above and download it using another download tool. For example, with Thunderbolt, you can download it in about 5 minutes or try it with a VPN download. Speed up the way to download everyone has a trick, according to their own environment to choose the fastest way to download.
2: Find the directory of the brew download file, move the file you just downloaded to the directory
# cd `brew --cache` //进入brew的下载目录 # rm go-1.6.2.el_capitan.bottle.tar.gz //删除刚才下载一半的文件 # mv /Downloads/go-1.6.2.el_capitan.bottle.tar.gz ./ //将下载好的压缩包放到brew下载目录
3: Continue execution: BRW Install Go
Note: The above is just take the go installation as an example, but after the test, go installation package only dozens of m, so the speed is not very obvious, can be selected according to the actual situation. This article just provides a way to speed up ideas.
Use Brew to install software in Mac, download too slow what to do?