Score:0

qmake- No Such File or Directory after Installing QT5

gu flag

OS: Ubuntu 22.04.1 KDE Plasma: 5.24.6 KDE Frameworks: 5.92.0 QT: 5.15.3

I installed QT5 from their website. Downloaded the installer and ran it. It installed QT in my Home directory and the qmake file is there and also in /usr/bin

When I try to run it I get an error message

qmake: could not exec '/usr/lib/qt5/bin/qmake': No such file or directory

enter image description here

Any idea how I can get this working?

Artillery avatar
gu flag
Updated with System Details OS etc
Hi-Angel avatar
es flag
Hmm, but you already use KDE with Qt5, why would you install it again? I also think you may well broke something, because you now have two versions of Qt5: one that came with the distro, and the other that you set up manually through a 3rd party installer.
Hi-Angel avatar
es flag
In case the only thing you wanted is to get `qmake` — just install `qt5-qmake`. You can look up package names on packages.ubuntu.com, for example: https://packages.ubuntu.com/search?keywords=qmake&searchon=names&suite=jammy&section=all
Artillery avatar
gu flag
I was getting the same 'File Not Found' error before I installed QT from their website. Ive tried uninstalling it through the QT maintenance tool I downloaded and still get the same error even tho qmake is still located in /usr/bin and /usr/bin is in the $PATH
Hi-Angel avatar
es flag
After you've uninstalled it through their maintenance tool, did you install `qt5-qmake`? What does `dpkg -S /usr/bin/qmake` show?
Artillery avatar
gu flag
I just did that and installed qt5-make using the apt-get command and it's finding it now. It shows -> qtchooser: /usr/bin/qmake. when I run it I get another error now Project ERROR: Unknown module(s) in QT: uitools multimedia. Is that another thing that needs to be installed?
Hi-Angel avatar
es flag
Yeah, you want two more packages `sudo apt install qttools5-dev qtmultimedia5-dev`. However that's irrelevant to your question, because now you're just trying to gather dependencies for whatever project you're building, whereas your original question was about misconfiguration of Qt5 and I'm glad that's solved. I'll post an answer in a minute.
Artillery avatar
gu flag
Ok thanks for your help
Score:0
es flag

Please, don't install stuff into your system through some custom scripts by 3rd parties (be it a make/ninja install or some bash script), unless you know what you're doing. Such scripts almost never communicate with the package manager, and so will leave a bunch of untracked files in the system, which may later break if something you install through package manager overwrites one of the files installed by a script (or vice versa: the script may overwrite a file installed by package manager). The correct way is to create a deb package for installation.

In your case you already had Qt5 in the system, but you additionally installed another one through a script from Qt website. There's no need to do that. Even if you had no Qt5, you could just install it through the usual means of package manager (e.g. by using Discover or GNOME Software, or by running sudo apt install package).

The package containing /usr/bin/qmake is called qt5-qmake.

You can find what package contains specific binary by using search on https://packages.ubuntu.com/ site, or by simply using your favorite search engine. As a matter of fact, that's how I figured out in the comments the packages you want for uitools and multimedia deps.

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.