Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
After Qt installation, an application cannot find Qt, and qmake also not working
klausb last edited by
I installed Qt5.6.1 on Ubuntu 16.04 LTS and the development environment starts but that's not what I need.
With the installer, it was installed in my home directory under /Qt5.6.1
I have a program compiled on another Ubuntu 14.04 LTS system which is not working on the new installation.
The error is:
./xflr5: /usr/lib/x86_64-linux-gnu/libQt5OpenGL.so.5: version
Qt_5' not found (required by ./xflr5) ./xflr5: /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5: versionQt_5' not found (required by ./xflr5)
./xflr5: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version
Qt_5.6' not found (required by ./xflr5) ./xflr5: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: versionQt_5' not found (required by ./xflr5)
./xflr5: /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5: version `Qt_5' not found (required by ./xflr5)
I also tried to compile a new version on the new system using qmake, that's also not working.
I assume there need to be some PATH setting in .bashrc and .profile which were required on the old system but this didn't help:
What settings are requires to compile a program using qmake?
@klausb I do this in my .bashrc:
PATH="/usr/local/Qt/bin:$PATH" QTDIR="/usr/local/Qt" export PATH QTDIR
That should get you what you need to use your Qt. Make sure you adjust to your paths. Your QTDIR will be all the way to the directory that has
If all else fails you can start your apps with an
LD_LIBRARY_PATHwhich will cause them to use your specific Qt version instead of the system one.
HI and welcome to devnet,
If you'd like to build/run your application on the command line, you should rather use the full path to the version of qmake you want to use. That way you know precisely which one you'll be calling.
Modifying the PATH environment like that has a side effect: if you are using also your distribution's dev package for development it won't be the default anymore.
@SGaist That is true. I usually prefer just my custom built Qt to develop with though. I rarely use the one that is installed with Linux.
On occasion I have a project that needs an older Qt, in which case I tend to use aliases to switch. I tend to have things like
alias set-qt54="..."which I can call to change my QTDIR and PATH to the Qt I want. I would find it much more annoying to constantly have to do something like
/usr/local/Qt/bin/qmakeevery time I wanted to run it. Although I use almost exclusively cmake now so it probably wouldn't bother me anymore. :)