Mac m2pro homebrew 安装qt5

brew install qt@5

apple@appledeMBP qt-everywhere-src-5.14.2 % brew install qt@5

==> Fetching dependencies for qt@5: libpng , freetype , pcre2 , python-packaging , openssl@3 , sqlite , glib , jpeg-turbo , libtiff , md4c , giflib and webp

==> Fetching libpng

==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/libpng-1.6.46.arm64_ventura.bottle.tar.gz

######################################################################################################################################################################################################################################################### 100.0%

==> Fetching freetype

==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/freetype-2.13.3.arm64_ventura.bottle.tar.gz

######################################################################################################################################################################################################################################################### 100.0%

==> Fetching pcre2

==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/pcre2-10.44.arm64_ventura.bottle.tar.gz

######################################################################################################################################################################################################################################################### 100.0%

==> Fetching python-packaging

==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/python-packaging-24.2.all.bottle.tar.gz

######################################################################################################################################################################################################################################################### 100.0%

==> Fetching openssl@3

==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/openssl%403-3.4.1.arm64_ventura.bottle.tar.gz

######################################################################################################################################################################################################################################################### 100.0%

==> Fetching sqlite

==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/sqlite-3.49.0.arm64_ventura.bottle.tar.gz

######################################################################################################################################################################################################################################################### 100.0%

==> Fetching glib

==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/glib-2.82.4.arm64_ventura.bottle.1.tar.gz

######################################################################################################################################################################################################################################################### 100.0%

==> Fetching jpeg-turbo

==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/jpeg-turbo-3.1.0.arm64_ventura.bottle.tar.gz

######################################################################################################################################################################################################################################################### 100.0%

==> Fetching libtiff

==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/libtiff-4.7.0.arm64_ventura.bottle.1.tar.gz

######################################################################################################################################################################################################################################################### 100.0%

==> Fetching md4c

==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/md4c-0.5.2.arm64_ventura.bottle.tar.gz

######################################################################################################################################################################################################################################################### 100.0%

==> Fetching giflib

==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/giflib-5.2.2.arm64_ventura.bottle.tar.gz

######################################################################################################################################################################################################################################################### 100.0%

==> Fetching webp

==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/webp-1.5.0.arm64_ventura.bottle.tar.gz

######################################################################################################################################################################################################################################################### 100.0%

==> Fetching qt@5

==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/qt%405-5.15.16.arm64_ventura.bottle.tar.gz

######################################################################################################################################################################################################################################################### 100.0%

==> Installing dependencies for qt@5: libpng , freetype , pcre2 , python-packaging , openssl@3 , sqlite , glib , jpeg-turbo , libtiff , md4c , giflib and webp

==> Installing qt@5 dependency: libpng

==> Pouring libpng-1.6.46.arm64_ventura.bottle.tar.gz

🍺 /opt/homebrew/Cellar/libpng/1.6.46: 28 files, 1.4MB

==> Installing qt@5 dependency: freetype

==> Pouring freetype-2.13.3.arm64_ventura.bottle.tar.gz

🍺 /opt/homebrew/Cellar/freetype/2.13.3: 68 files, 2.5MB

==> Installing qt@5 dependency: pcre2

==> Pouring pcre2-10.44.arm64_ventura.bottle.tar.gz

🍺 /opt/homebrew/Cellar/pcre2/10.44: 237 files, 6.3MB

==> Installing qt@5 dependency: python-packaging

==> Pouring python-packaging-24.2.all.bottle.tar.gz

🍺 /opt/homebrew/Cellar/python-packaging/24.2: 56 files, 491.3KB

==> Installing qt@5 dependency: openssl@3

==> Pouring [email protected]_ventura.bottle.tar.gz

🍺 /opt/homebrew/Cellar/openssl@3/3.4.1: 7,236 files, 33.5MB

==> Installing qt@5 dependency: sqlite

==> Pouring sqlite-3.49.0.arm64_ventura.bottle.tar.gz

🍺 /opt/homebrew/Cellar/sqlite/3.49.0: 13 files, 4.7MB

==> Installing qt@5 dependency: glib

==> Pouring glib-2.82.4.arm64_ventura.bottle.1.tar.gz

🍺 /opt/homebrew/Cellar/glib/2.82.4: 504 files, 36.3MB

==> Installing qt@5 dependency: jpeg-turbo

==> Pouring jpeg-turbo-3.1.0.arm64_ventura.bottle.tar.gz

🍺 /opt/homebrew/Cellar/jpeg-turbo/3.1.0: 47 files, 3.5MB

==> Installing qt@5 dependency: libtiff

==> Pouring libtiff-4.7.0.arm64_ventura.bottle.1.tar.gz

🍺 /opt/homebrew/Cellar/libtiff/4.7.0: 486 files, 8.5MB

==> Installing qt@5 dependency: md4c

==> Pouring md4c-0.5.2.arm64_ventura.bottle.tar.gz

🍺 /opt/homebrew/Cellar/md4c/0.5.2: 20 files, 301.9KB

==> Installing qt@5 dependency: giflib

==> Pouring giflib-5.2.2.arm64_ventura.bottle.tar.gz

🍺 /opt/homebrew/Cellar/giflib/5.2.2: 20 files, 547.0KB

==> Installing qt@5 dependency: webp

==> Pouring webp-1.5.0.arm64_ventura.bottle.tar.gz

🍺 /opt/homebrew/Cellar/webp/1.5.0: 64 files, 2.5MB

==> Installing qt@5

==> Pouring [email protected]_ventura.bottle.tar.gz

==> Caveats

We agreed to the Qt open source license for you.

If this is unacceptable you should uninstall.

You can add Homebrew's Qt to QtCreator's "Qt Versions" in:

Preferences > Qt Versions > Link with Qt...

pressing "Choose..." and selecting as the Qt installation path:

/opt/homebrew/opt/qt@5

qt@5 is keg-only, which means it was not symlinked into /opt/homebrew,

because this is an alternate version of another formula.

If you need to have qt@5 first in your PATH, run:

echo 'export PATH="/opt/homebrew/opt/qt@5/bin:$PATH"' >> ~/.zshrc

For compilers to find qt@5 you may need to set:

export LDFLAGS="-L/opt/homebrew/opt/qt@5/lib"

export CPPFLAGS="-I/opt/homebrew/opt/qt@5/include"

==> Summary

🍺 /opt/homebrew/Cellar/qt@5/5.15.16: 10,849 files, 341.1MB

==> Running `brew cleanup qt@5`...

Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.

Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

==> Caveats

==> qt@5

We agreed to the Qt open source license for you.

If this is unacceptable you should uninstall.

You can add Homebrew's Qt to QtCreator's "Qt Versions" in:

Preferences > Qt Versions > Link with Qt...

pressing "Choose..." and selecting as the Qt installation path:

/opt/homebrew/opt/qt@5

qt@5 is keg-only, which means it was not symlinked into /opt/homebrew,

because this is an alternate version of another formula.

If you need to have qt@5 first in your PATH, run:

echo 'export PATH="/opt/homebrew/opt/qt@5/bin:$PATH"' >> ~/.zshrc

For compilers to find qt@5 you may need to set:

export LDFLAGS="-L/opt/homebrew/opt/qt@5/lib"

export CPPFLAGS="-I/opt/homebrew/opt/qt@5/include"

查看已安装的qt:brew info qt

apple@appledeMBP qt-everywhere-src-5.14.2 % brew info qt

==> qt: stable 6.8.2 (bottled), HEAD

Cross-platform application and UI framework

https://www.qt.io/

Not installed

From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/q/qt.rb

License: BSD-3-Clause AND GFDL-1.3-no-invariants-only AND GPL-2.0-only AND (GPL-3.0-only WITH Qt-GPL-exception-1.0) AND LGPL-3.0-only

==> Dependencies

Build: cmake , ninja , node , pkgconf , [email protected] , vulkan-headers , vulkan-loader , molten-vk

Required: assimp , brotli , dbus , double-conversion , freetype , glib , harfbuzz , hunspell , icu4c@76 , jasper , jpeg-turbo , libb2 , libmng , libpng , libtiff , md4c , openssl@3 , pcre2 , sqlite , webp , zstd

==> Requirements

Build: macOS <= 14 (or Linux) , Xcode (on macOS)

==> Options

--HEAD

Install HEAD version

==> Caveats

You can add Homebrew's Qt to QtCreator's "Qt Versions" in:

Preferences > Qt Versions > Link with Qt...

pressing "Choose..." and selecting as the Qt installation path:

/opt/homebrew

==> Analytics

install: 24,085 (30 days), 74,169 (90 days), 338,534 (365 days)

install-on-request: 14,779 (30 days), 47,672 (90 days), 222,323 (365 days)

build-error: 143 (30 days)

apple@appledeMBP qt-everywhere-src-5.14.2 % brew info qt@5

==> qt@5: stable 5.15.16 (bottled) [keg-only]

Cross-platform application and UI framework

https://www.qt.io/

Installed

/opt/homebrew/Cellar/qt@5/5.15.16 (10,849 files, 341.1MB)

Poured from bottle using the formulae.brew.sh API on 2025-02-13 at 14:11:38

From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/q/[email protected]

License: GFDL-1.3-only AND GPL-2.0-only AND GPL-3.0-only AND LGPL-2.1-only AND LGPL-3.0-only

==> Dependencies

Build: node , pkgconf , [email protected]

Required: freetype , glib , jpeg-turbo , libpng , libtiff , md4c , pcre2 , sqlite , webp , zstd , gettext

==> Requirements

Build: Xcode (on macOS)

Required: macOS >= 10.12 (or Linux)

==> Caveats

We agreed to the Qt open source license for you.

If this is unacceptable you should uninstall.

You can add Homebrew's Qt to QtCreator's "Qt Versions" in:

Preferences > Qt Versions > Link with Qt...

pressing "Choose..." and selecting as the Qt installation path:

/opt/homebrew/opt/qt@5

qt@5 is keg-only, which means it was not symlinked into /opt/homebrew,

because this is an alternate version of another formula.

If you need to have qt@5 first in your PATH, run:

echo 'export PATH="/opt/homebrew/opt/qt@5/bin:$PATH"' >> ~/.zshrc

For compilers to find qt@5 you may need to set:

export LDFLAGS="-L/opt/homebrew/opt/qt@5/lib"

export CPPFLAGS="-I/opt/homebrew/opt/qt@5/include"

==> Analytics

install: 9,948 (30 days), 41,078 (90 days), 193,144 (365 days)

install-on-request: 6,554 (30 days), 28,290 (90 days), 127,998 (365 days)

build-error: 47 (30 days)

安装qtcreator

apple@appledeMBP qt-everywhere-src-5.14.2 % brew install --cask qt-creator

==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/api/cask.jws.json

==> Downloading https://download.qt.io/official_releases/qtcreator/15.0/15.0.1/qt-creator-opensource-mac-x86_64-15.0.1.dmg

==> Downloading from https://mirrors.sau.edu.cn/qt/official_releases/qtcreator/15.0/15.0.1/qt-creator-opensource-mac-x86_64-15.0.1.dmg

######################################################################################################################################################################################################################################################### 100.0%

==> Installing Cask qt-creator

==> Moving App 'Qt Creator.app' to '/Applications/Qt Creator.app'

🍺 qt-creator was successfully installed!

如果使用cmake

apple@appledeMBP qt-everywhere-src-5.14.2 % brew install cmake

==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/api/formula.jws.json

==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/api/cask.jws.json

Warning: Treating cmake as a formula. For the cask, use homebrew/cask/cmake or specify the `--cask` flag. To silence this message, use the `--formula` flag.

==> Fetching cmake

==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/cmake-3.31.5.arm64_ventura.bottle.tar.gz

######################################################################################################################################################################################################################################################### 100.0%

==> Pouring cmake-3.31.5.arm64_ventura.bottle.tar.gz

==> Caveats

To install the CMake documentation, run:

brew install cmake-docs

Emacs Lisp files have been installed to:

/opt/homebrew/share/emacs/site-lisp/cmake

==> Summary

🍺 /opt/homebrew/Cellar/cmake/3.31.5: 3,767 files, 56.8MB

==> Running `brew cleanup cmake`...

Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.

Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

apple@appledeMBP qt-everywhere-src-5.14.2 % cmake -v

CMake Error: Unknown argument -v

CMake Error: Run 'cmake --help' for all supported options.

apple@appledeMBP qt-everywhere-src-5.14.2 % cmake --version

cmake version 3.31.5

CMake suite maintained and supported by Kitware (kitware.com/cmake).

如果使用gcc

brew install gcc

相关推荐
AAA废品回收站陈师傅1 小时前
10乱码问题的解释(1)
qt
长流小哥1 小时前
可视化开发:用Qt实现Excel级动态柱状图
开发语言·c++·qt·ui
mingyuewu2 小时前
MAC安装docker 后提示com.docker.vmnetd”将对您的电脑造成伤害
macos·docker·容器
嘤国大力士3 小时前
C++11&QT复习 (十)
java·c++·qt
only-lucky3 小时前
QT之QML(简单示例)
前端·javascript·qt
叶孤程4 小时前
Qt图形化界面为何总被“冷落“?
开发语言·c++·qt
前端 贾公子4 小时前
Mac 设置静态IP的方法 和 Mac 设置静态IP后 无法联网
tcp/ip·macos·智能路由器
二进制人工智能5 小时前
【QT5 网络编程示例】UDP 通信
c++·qt
bing_1585 小时前
JVM 每个区域分别存储什么数据?
java·jvm
zzhz9255 小时前
Jmeter(性能指标、指标插件、测试问题、面试题、讲解稿)
java·jvm·jmeter