Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

where is libQt5Widgets.so.5 ?



  • Hi All,
    I'm QTCreator to produce a program in Linux. Under creator my software runs fine. However when I move the executable to another directory I get

    error while loading shared libraries: libQt5Widgets.so.5: cannot open shared object file: No such file or directory
    

    I read online I need to package the libs with the program. However when I search my pc I can't find libQt5Widgets.so.5?
    Can anyone advise where I find these?
    Thanks

    
    ldd Con*
    	linux-gate.so.1 =>  (0xf7715000)
    	libQt5Widgets.so.5 => not found
    	libQt5Gui.so.5 => not found
    	libQt5Core.so.5 => not found
    	libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xf756a000)
    	libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf754c000)
    	libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7391000)
    	libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf7344000)
    	/lib/ld-linux.so.2 (0x56597000)
    

  • Moderators

    @tony67 On Linux it is under<QtDir>/5.6/gcc_64/lib where QtDir is where you installed Qt.
    Or you can just use locate or find to search the library.
    Hope that you know how to set those paths in environment.



  • Yes I've found them. Stupidly had search folder set to /home.

    Copied across, still didn't work.

    By setting path you mean export PATH=$PATH: /usr/lib/x86_64-linux-gnu ?
    Do I need to do this to get get it working for other people, eg add a sh to add paths to their system :s



  • Add export PATH=$PATH: /usr/lib/x86_64-linux-gnu, paths shows in echo. Running binary stiil reports error. ldd still shows libraries are missing :S
    Can anyone advise on this please?


  • Moderators

    Use LD_LIBRARY_PATH. Or you can set them system wide using ldconfig.


  • Lifetime Qt Champion


Log in to reply