What is the correct approach to install Qt SDK in Ubuntu?
-
I've just installed Ubuntu and started installing Qt 5.10 from the installer
qt-unified-linux-x64-3.0.2-online.run
The Qt Creator works just fine but I couldn't makeqmaketo run from the terminal because I'm not acquainted with setting environment variables in Linux. I've searched and tried several methods but stillqmakeis not found. I've installed one version of Qt which is 5.10 but runningqtchooser -list-versionsyields this4 5 default qt4-x86_64-linux-gnu qt4 qt5-x86_64-linux-gnu qt5I didn't install Qt4 why it is there?
-
Hi
did you install compiler and tools?
https://www.ics.com/blog/getting-started-qt-and-qt-creator-linux -
Hi
did you install compiler and tools?
https://www.ics.com/blog/getting-started-qt-and-qt-creator-linux -
@mrjj yes I did. also, I came across this page when I was searching. Qt Creator is working fine but I couldn't manage to run qmake from the terminal. The environment variables are not set properly.
If you install Qt with the Qt installer, no environment variables are changed.
qtchooseris for the Qt versions contained in Ubuntus software repositories.So either call qmake with full path (e.g.
/opt/Qt/5.9.2/gcc_64/bin/qmakefor me) or add this path to yourPATHenvironment variable (e.g. by adding this path in your~/.bashrc:export PATH=$PATH:/path/to/your/qmakeRegards
-
If you install Qt with the Qt installer, no environment variables are changed.
qtchooseris for the Qt versions contained in Ubuntus software repositories.So either call qmake with full path (e.g.
/opt/Qt/5.9.2/gcc_64/bin/qmakefor me) or add this path to yourPATHenvironment variable (e.g. by adding this path in your~/.bashrc:export PATH=$PATH:/path/to/your/qmakeRegards
-
@aha_1980 running
export ...yields this errorqmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directoryIt seems to me there is a default location that the shell searches in but I'm not able to modify it.
-
-
Hi,
No, use the full path to the version of qmake you want to use.
-
Do you have a special reason why you do not install QT from the Ubuntu repository?
have you try sudo apt-get install qt5-qmake
@ckvsoft good question. Actually, I though the version in the repository is not the latest that is why I'v chosen the suggested tool in Qt download page. Not to mention that in Qt website, there is no mention to download the library from the repository. I maybe wrong regarding whether the repository doesn't include the latest version.
-
It could be but you'd have to keep it up to date with each new release of Qt.
Unless you plan to develop with only one version of Qt, I'd recommend sticking with the use of the full path. That way you know for sure the version you are currently calling.
An alternative if you really want to avoid the full path is to use a symbolic link and call it something like qmake-5.10.