mac系统用brew命令安装opencv过慢的问题解决方法

在mac系统中,执行brew install opencv命令时,安装时间过长,有时会花费数天时间,经过反复不断摸索,发现系统默认是从清华源下载文件,我们如果将清华源换成阿里云,问题即可解决,解决方法为顺次执行如下命令:

cd "$(brew --repo)"  
git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile

顺次执行完之后,会发现安装效率得到了明显的提升。技术交流群:873647617。

你可能感兴趣的:(经验,opencv)