






















https://mirror.tuna.tsinghua.edu.cn/help/ubuntu-ports/
传统格式(/etc/apt/sources.list)
Ubuntu 版本
Ubuntu 24.04 LTS
启用源码源
启用 proposed
强制安全更新使用镜像
``
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ noble main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ noble-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ noble-backports main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports/ noble-security main restricted universe multiverse
``
更新系统软件包列表:
bash
sudo apt update
sudo apt upgrade
安装必要的构建工具和基础库:
bash
sudo apt install build-essential libgl1-mesa-dev
这一步安装了编译Qt应用程序所需的基础工具和OpenGL库。
安装Qt核心开发库和工具:
bash
sudo apt install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools
qtbase5-dev 是Qt 5的核心开发库,qt5-qmake 是项目构建工具。
(可选)安装Qt Creator集成开发环境:
bash
sudo apt install qtcreator
安装后,你可以在应用程序菜单中找到它。
(可选)安装额外模块:
根据你的项目需要,可以选择安装其他模块,例如:
bash
sudo apt install qtdeclarative5-dev
sudo apt install libqt5serialport5-dev
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。