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 openssl@3-3.4.1.arm64_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 qt@5-5.15.16.arm64_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 , python@3.13 , 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/qt@5.rb

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 , python@3.12

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

相关推荐
CCCC13101633 小时前
嵌入式学习(day 28)线程
jvm·学习
没有bug.的程序员4 小时前
JVM 总览与运行原理:深入Java虚拟机的核心引擎
java·jvm·python·虚拟机
前端市界9 小时前
前端视角: PyQt6+Vue3 跨界开发实战
前端·qt·pyqt
共享家952712 小时前
linux-数据链路层
linux·网络·macos
舒一笑13 小时前
Started TttttApplication in 0.257 seconds (没有 Web 依赖导致 JVM 正常退出)
jvm·spring boot·后端
誰能久伴不乏15 小时前
Qt 动态属性(Dynamic Property)详解
开发语言·qt
枫叶丹415 小时前
【Qt开发】常用控件(四)
开发语言·qt
搬砖的小熊猫16 小时前
JVM核心原理与实战优化指南
jvm
静若繁花_jingjing16 小时前
JVM执行引擎深入理解
jvm
CZIDC21 小时前
MacOS字体看起来比在 Windows 上更好?
macos