Score:3

Ubuntu 22.04 with Qt6 - qmake: could not find a Qt installation of ''

tr flag

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 ''

It is however possible to call/run qmake6. How to make qmake work and point it to qmake6?

Score:11
tr flag

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
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.