写这个笔记的原因是因为,总是遇到装一些软件时会跳到 github 去下载,慢如蜗牛难受。
安装 使用 homebrew, homebrew 的安装方法自己 bing 搜,国内建议 homebrew-CN
# 会安装最新版 qt
brew install qt qt-creator
重点, 选择 中科大的源
mirrors.ustc.edu.cn/help/brew.g…
将如下命令 写入 .zshrc
export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.ustc.edu.cn/brew.git"
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.ustc.edu.cn/homebrew-core.git"
export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.ustc.edu.cn/homebrew-bottles"
export HOMEBREW_API_DOMAIN="https://mirrors.ustc.edu.cn/homebrew-bottles/api"
下面这一段里面的重点是, 有两行里面有 --force, 只建议执行带有 homebrew-core 的哪一行, cask 的没有必要
# 手动设置
export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.ustc.edu.cn/brew.git"
# 注:自 brew 4.0 起,大部分 Homebrew 用户无需设置 homebrew/core 和 homebrew/cask 镜像,只需设置 HOMEBREW_API_DOMAIN 即可。
# 如果需要使用 Homebrew 的开发命令 (如 `brew cat <formula>`),则仍然需要设置 homebrew/core 和 homebrew/cask 镜像。
# 请按需执行如下两行命令:
brew tap --custom-remote homebrew/core https://mirrors.ustc.edu.cn/homebrew-core.git --force
brew tap --custom-remote homebrew/cask https://mirrors.ustc.edu.cn/homebrew-cask.git --force
其他的一些说明文档可以参考这里
mirrors.tuna.tsinghua.edu.cn/help/homebr…
下面内容来自: zhuanlan.zhihu.com/p/683487851
安装qt-creator
brew install qt-creator
安装qt
brew install qt
- 查看qt安装路径
brew info qt
zhb@bindembp ~ % brew info qt
==> qt: stable 6.6.1 (bottled), HEAD
Cross-platform application and UI framework
https://www.qt.io/
/opt/homebrew/Cellar/qt/6.6.1 (14,396 files, 623.5MB) *
/opt/homebrew/Cellar/qt/6.6.1就是qt安装路径
配置qt-creator
添加时选择[qt安装目录]/bin/qmake
选择qt版本、CMake Tool、编译器,如果是m1、m2等系列cpu的macbook,切换arm-darwin-generic-mach_o-64bit为默认再开始设置