qtchooser -install qt6 $(which qmake6)
qtchooser -install qt6 $(which qmake6)
https://askubuntu.com/questions/1460242/ubuntu-22-04-with-qt6-qmake-could-not-find-a-qt-installation-of
In Ubuntu 22.04 after installing Qt6 using
sudo apt install qt6-base-dev
calling qmake
results in an error message:
qmake: could not find a Qt installation of ''
or
qmake: could not exec '/usr/lib/qt5/bin/qmake': No such file or directory
It is however possible to call/run qmake6
. How to make qmake
work and point it to qmake6
?
In Ubuntu 22.04 there is currently an open bug QtChooser doesnt support qt6.
So even if Qt6 has been installed using sudo apt install qt6-base-dev
, qtchooser -l
does not list a qt6 option and qmake
outputs qmake: could not find a Qt installation of ''
.
Assuming Qt6 is installed and qmake6
can be called, I believe there are two options:
1. Select Qt6 system-wide
Generate qt6.conf
based on the path to qmake6
qtchooser -install qt6 $(which qmake6)
Move qt6.conf
to system-wide dir
sudo mv ~/.config/qtchooser/qt6.conf /usr/share/qtchooser/qt6.conf
Set Qt6 as default option
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. Select Qt6 for current user only
Generate qt6.conf
based on path to qmake6
qtchooser -install qt6 $(which qmake6)
Select Qt6 as default (place in ~/.bashrc
for persistence):
export QT_SELECT=qt6
========== End
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
2021-07-18 在QGIS中添加在线影像底图
2021-07-18 地理坐标系统
2021-07-18 创建应用快捷方式脚本
2020-07-18 B站插画教程
2020-07-18 插画
2020-07-18 从内存加载动态库