第一步:安装brew
1.terminal输入:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2.更换镜像源为清华源
terminal依次输入:
cd "$(brew --repo)"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
cd
brew update
第二步:OpenCV
terminal输入:
brew install opencv
Opencv安装的位置为 :/usr/local/Cellar/opencv
第三步:QT
下载链接:http://download.qt.io/archive/qt/,我下载的版本是5.14.0