Can't update Qt from 5.12 to 5.15
-
Hi, I have Qt 5.12 in my Ubuntu PC. But I have to update it to 5.15. So, I downloaded 5.15 and installed it but when I type qmake --version to Konsole, it still shows 5.12 and I cannot run the application I want.
To download and build, I followed the instructions here. I'm not using Qt Online Installer.
-
You have to make sure you call the correct qmake from the newly installed Qt version by e.g. extending your PATH environment variable or using the absolute path to the correct qmake executable.
-
Thanks for the reply. Ok, my Qt5 libs are located at the following path. So, I extended my PATH by:
export PATH=$PATH:/usr/lib/x86_64-linux-gnuThen I did qmake --version again, still shows 5.12.
-
Thanks for the reply. Ok, my Qt5 libs are located at the following path. So, I extended my PATH by:
export PATH=$PATH:/usr/lib/x86_64-linux-gnuThen I did qmake --version again, still shows 5.12.
@kimi-raikkonen said in Can't update Qt from 5.12 to 5.15:
Then I did qmake --version again, still shows 5.12.
Because you added your path at the end and the other qmake is in a directory before yours so this is picked up.
-
All right. In order to put the directory before others, these are my last steps:
1) $ export PATH=/usr/lib/x86_64-linux-gnu
2) $ qmake --versionCommand 'qmake' is available in the following places
- /bin/qmake
- /usr/bin/qmake
The command could not be located because '/usr/bin:/bin' is not included in the PATH environment variable.
qmake: command not found
3) So, I added /usr/bin:/bin by
$ export PATH=$PATH:/usr/bin:/bin4) qmake --version again and nothing happened. Qt version is still 5.12.
$ echo $PATH shows:
/usr/lib/x86_64-linux-gnu:/usr/bin:/bin -
I doubt you installed your new Qt to /usr - at least i hope you did not do it. Add the correct path to your qmake from Qt5.15
-
All right. In order to put the directory before others, these are my last steps:
1) $ export PATH=/usr/lib/x86_64-linux-gnu
2) $ qmake --versionCommand 'qmake' is available in the following places
- /bin/qmake
- /usr/bin/qmake
The command could not be located because '/usr/bin:/bin' is not included in the PATH environment variable.
qmake: command not found
3) So, I added /usr/bin:/bin by
$ export PATH=$PATH:/usr/bin:/bin4) qmake --version again and nothing happened. Qt version is still 5.12.
$ echo $PATH shows:
/usr/lib/x86_64-linux-gnu:/usr/bin:/bin@kimi-raikkonen install Qt5.15 under /opt/Qt(this is the default installation of Qt installer). Add its qmake path in front of other paths
for example:
export PATH=/opt/Qt/5.15.2/gcc_64/bin:$PATH
this has to be set in your shell which will trigger the setting whenever you open a terminal.
Or you purge 5.12 and the path order will not matter anymore.