Qt for Linux/X11
Qt 对不同 Linux 平台的支持广泛而成熟。
要下载和安装 Linux 版 Qt,请按照 "Qt 入门"页面上的说明操作。
支持的配置
支持以下配置。
分发 | 架构 | 编译器 | 注释 |
---|---|---|---|
Red Hat™8.6 | x86_64 | GCC 10(工具集) | |
Red Hat 8.8 | x86_64 | GCC 10(工具集) | |
Red Hat 8.10 | x86_64 | GCC 10(工具集) | |
Red Hat 9.2 | x86_64 | GCC 11 | |
Red Hat 9.4 | x86_64 | GCC 11 | |
openSUSE 15.5 | x86_64 | GCC 9、GCC 10、GCC 11、GCC 12 | |
SUSE Linux Enterprise Server 15 SP5 | x86_64 | GCC 10 | |
Ubuntu 22.04 | x86_64 | 由 Canonical 提供的 GCC、GCC 11.x | |
Ubuntu 24.04 | x86_64, arm64 | 由 Canonical 提供的 GCC,GCC 13.x | 请参阅注释。 |
Debian 11.6 | x86_64, arm64 | GCC 10 | 技术预览 另请参见:企业 Qt Debian 软件包。 |
注: 对于台式机上的 Arm Linux,我们使用配备 8GB 内存和 Ubuntu 24.04 的 Raspberry Pi 5 作为参考平台。如果您在其他硬件上遇到问题,请尝试在 Raspberry Pi 5 上重现问题。我们计划在有更多基于 ARM 的桌面硬件可用时,转而支持常规平台。官方二进制文件是在 Ubuntu 24.04 上构建的,其中包含 glibc 2.39。
开发主机要求
Linux 版 Qt 安装程序假定主机操作系统提供了 C++ 编译器、调试器、make 和其他开发工具。此外,构建图形 Qt 应用程序需要安装Qt for X11 Requirements 和 OpenGL 库及头文件。大多数 Linux 发行版默认情况下并不安装所有这些工具,但建立开发环境仍然很简单。
使用以下命令安装构建 Qt 应用程序的基本要求:
Debian/Ubuntu (apt-get)
sudo apt-get install build-essential libgl1-mesa-dev
Fedora/RHEL/CentOS (yum)
sudo yum groupinstall "C Development Tools and Libraries" sudo yum install mesa-libGL-devel
openSUSE (zypper)
sudo zypper install -t pattern devel_basis
从源代码构建 Qt
您也可以从源码包构建 Qt,并根据目标平台进行配置。源码包可从http://www.qt.io/download/ 获取。
以下是有关从源代码构建 Qt 的更多信息。
部署和其他问题
以下页面涉及创建 Linux/X11 应用程序的具体问题和建议。
何去何从
我们邀请您探索 Qt 的其他部分。我们为您准备了概述,帮助您决定使用哪些 API,我们的示例还演示了如何使用我们的 API。
Qt 活跃的社区网站http://qt.io包含维基、论坛以及其他学习指南和介绍。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.