Error on Execution -Version 'Qt_5' Not Found Required By

Error on execution -version `Qt_5' not found required by

Issue happens because you have Qt installed in /usr/lib/x86_64-linux-gnu from distro which ld will use by default. To avoid such issues you can compile with -rpath or run with LD_LIBRARY_PATH=/path/to/your/Qt/libs/location to help linker find needed Qt version.

Can't run Qt apps: version `Qt_5' not found

So I figured out an answer according to these two previous questions:

  • Error on execution -version `Qt_5' not found required by
  • How to set the environmental variable LD_LIBRARY_PATH in linux

To summarize, to add the libraries the right way, one should add a custom .conf file to the folder /etc/ld.so.conf.d containing all the absolute paths to library folders and then run sudo ldconfig. :)

qtcreator Qt_5 not found

Qtcreator and rviz don't work because they require qt libs from /usr/lib/x86_64-linux-gnu but links with /usr/lib/libQt* instead (you can double check it using ldd $(which qtcreator) and ldd $(which rviz)). This mess indeed has lot to do with your camera package installation.

I see few ways to address this problem:

1.
It looks like your linker prioritize /usr/lib over /usr/lib/x86_64-linux-gnu. Check your LD_LIBRARY_PATH:

echo $LD_LIBRARY_PATH

and if it contains a /usr/lib - try to get rid of it (you must track where you update your LD_LIBRARY_PATH - is it in .bashrc or somewhere else? maybe /etc/ld.so.conf.d?)

2.
Set your LD_LIBRARY_PATH in .bashrc to point a valid qt dir. Remember to not override the variable, but rather extend it (put that at the end of ~/.bashrc):

export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH

then reload the .bashrc:

. ~/.bashrc

In your experiments, you did an override when launching qtcreator and rviz so only one of these two apps was working depend on what LD_LIBRARY_PATH you set.

Alternatively, you can add /usr/lib/x86_64-linux-gnu/ path in /etc/ld.so.conf.d/ - just create a new .conf file with qt path and reload everything with

sudo ldconfig

Using this method will propably break your camera package because from now on it will link with libs from your new path.

3.
Temporary move Qt libraries supplied with camera package (/usr/lib/libQt*) to another location and check if spinview works fine with other version of qt than 5.7. If yes - you are free to delete qt5.7 libs from /usr/lib/ as they are not needed - no sophisticated uninstall process is necessary here. You can always restore it with your camera .deb package anyway.

Unable to Load QT Environment

Should we have a number of lines like:

qtcreator: /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5: no version information available (required by qtcreator)

Pointing to the root of Linux file system user and not to /home/user indicates we have installed Qt Creator (not really the latest Qt framework and not even Creator) with sudo apt install qtcreator which may come handy as an older IDE but not much else and prone to system errors due to many library soft link redirections etc.

First purge it out of the system:

sudo apt purge qtcreator

As original poster asked the problem is solved by completely removing package-installed Qt Creator and installing newer Qt complete framework with options with new Qt Creator by using Qt Maintenance Tool. For which you may want to enable the execution file attribute after it was downloaded:

chmod +x ~/Downloads/qt-unified-linux-x64-3.2.3-online.run
~/Downloads/qt-unified-linux-x64-3.2.3-online.run

P.S. Mind the above installs Qt Creator and the framework for the user but of course with sudo and pointing to the right location we could install Qt for the entire system as root somehow yet it is discouraged: https://forum.qt.io/topic/31366/install-qt-qt-creator-as-root Then why would sudo apt install qtcreator still be widely spread option? If so allowing the other user to access your files with some soft-link exercise will do.



Related Topics



Leave a reply



Submit