安装
- 前置安装
sudo apt install build-essential libgl1-mesa-dev
- 安装qt6
sudo apt install qt6*
- 验证
qmake --version

可能遇到的问题
qmake: could not find a Qt installation of ‘’
解决方案来自https://askubuntu.com/questions/1460242/ubuntu-22-04-with-qt6-qmake-could-not-find-a-qt-installation-of
方案1:所有用户可用
qtchooser -install qt6 $(which qmake6)
sudo mv ~/.config/qtchooser/qt6.conf /usr/share/qtchooser/qt6.conf
sudo mkdir -p /usr/lib/$(uname -p)-linux-gnu/qt-default/qtchooser
sudo ln -n /usr/share/qtchooser/qt6.conf /usr/lib/$(uname -p)-linux-gnu/qt-default/qtchooser/default.conf
方案2:当前用户可用
qtchooser -install qt6 $(which qmake6)
export QT_SELECT=qt6



1369

被折叠的 条评论
为什么被折叠?



