2

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?

Hi-Angel
  • 4,915
Artillery
  • 386
  • 2
  • 5
  • 14
  • Updated with System Details OS etc – Artillery Oct 21 '22 at 22:37
  • 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 Oct 21 '22 at 23:56
  • 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 – Hi-Angel Oct 21 '22 at 23:58
  • 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 – Artillery Oct 22 '22 at 08:58
  • After you've uninstalled it through their maintenance tool, did you install qt5-qmake? What does dpkg -S /usr/bin/qmake show? – Hi-Angel Oct 22 '22 at 11:00
  • 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? – Artillery Oct 22 '22 at 11:22
  • 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. – Hi-Angel Oct 22 '22 at 11:27
  • Ok thanks for your help – Artillery Oct 22 '22 at 11:43

1 Answers1

0

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.

Hi-Angel
  • 4,915