[SOLVED] How to install QT under the Raspbian image?
-
If I use the second option: is it enough to say apt-get install qt50-snapshot or do I have to do additional actions to install the snapshot?
-
yes. installed qt50-snapshot on RPi is enough to run program cross-compiled on your Local PC.
Just follow this "tutorial":http://qt-project.org/wiki/Create#QtonPi_App_SDK to cross-compile your app. -
But after installing the snapshot on the pi, cross-compiling the hello-world-app and deploying it I get the messagelib
error while loading shared libraries : QtQuick.so.5: cannot open shared object file: No such file or directory
do I have to do more than to say apt-get install qt50-snapshot?
-
Look into the /opt/ path, can you see "vt" & "qt5" folder? Look into the /opt/qt5/lib which libraries are installed. You should have /opt/qt5/lib/libQtQuick.so.5 there.
If Qt libs are installed correctly, but you still can't deploy and run your app, check with ldd(on the RPi) if all dependency for your app are found. just run:
@
ldd /path/to/your/hello-qtonpi
@you can also check if all dependency for Qt is there:
@
readelf -d /opt/qt5/lib/libQtCore.so.5.0.0
readelf -d /opt/qt5/lib/libQtQuick.so.5.0.0
@ -
There is no qt5 or vt in my opt-folder
-
ldd says : not a dynamic executable
the readelf commands seem to work even if the folder is /opt/qt50-snapshot/lib. does this matter?
-
do I have to use special settings in the pro file or otherwere in the project?
-
Is it possible that I have to use another qmake to cross-compile for the wheezy than for the original qtonpi image?
-
can be solved by
export LD_LIBRARY_PATH=/opt/qt50-snaphot/lib
before running the qt-program.
-
I ran into the same problem, but in my case it comes from a custom QT5 build (not the snapshot).
Anyway, if followed http://qt-project.org/wiki/RaspberryPi_Beginners_Guide
and qt ended being installed not in opt but in /usr/local/qt5pi/
libQtQuick.so.5.0.0 is in the lib subfolder but setting LD_LIBRARY_PATH does not change anything which is quite surprising, and as for Pinkypanzer the ldd tells me hello-qtonpi is not an executable :(Any other clue?
-
where did you execute it? via QtCreator or locally on the pi?
do you have the rights to execute it? -
now I see there's an error in my post. it has to be
export LD_LIBRARY_PATH=/opt/qt50-snapshot/lib
maybe this is your problem? you have to link the lib-folder -
in QT CREATOR you have to set the the path in the system environment
cited from the beginners guide:
At last, add the LD_LIBRARY_PATH on the “System Environment” and set it to “/usr/local/qt5pi/lib”In my case the path would be "/opt/qt50-snapshot/lib"
-
Then I'm sorry, I don't know what your problem is.
Did you check the path is available at you pi and you have the rights to read from it? -
I followed the beginners guide like yourself also and ran into the same problem.
Apps deployed and executed from within QtCreator ran correctly on the device but if I went to the command line on the RPi itself, I couldn't execute them (libQtQuick.. not found)
Running: export LD_LIBRARY_PATH=/usr/local/qt5pi/lib/
Fixes this problem but only when logged in as root!
If I export LD_LIBRARY_PATH as user 'pi' I still cannot execute the binary (same error as before).
Stranger still, QtCreator which can deploy and run the binary correctly, is logging in via ssh with user 'pi' !
Any ideas why this is happening?