3

I'm trying to distribute my Qt program as an executable. The only people who will be using this already have the proper Qt version (5.7.1) installed on their computers. I am currently testing this out on my very own computer and attempting to run the executable fails. I ran ldd on it and got the following output:

ldd MyProg 
./MyProg: /usr/lib/x86_64-linux-gnu/libQt5PrintSupport.so.5: version `Qt_5' not found (required by ./MyProg)
./MyProg: /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5: version `Qt_5_PRIVATE_API' not found (required by ./MyProg)
./MyProg: /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5: version `Qt_5' not found (required by ./MyProg)
./MyProg: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.7' not found (required by ./MyProg)
./MyProg: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5' not found (required by ./MyProg)
./MyProg: /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5: version `Qt_5' not found (required by ./MyProg)
./MyProg: /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5: version `Qt_5' not found (required by ./MyProg)
./MyProg: /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5: version `Qt_5' not found (required by ./MyProg)
    linux-vdso.so.1 =>  (0x00007ffe404d4000)
    liblapack.so.3 => /usr/lib/liblapack.so.3 (0x00007faa6df37000)
    libblas.so.3 => /usr/lib/libblas.so.3 (0x00007faa6dcc8000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007faa6daad000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007faa6d890000)
    libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007faa6d65f000)
    libSDL2-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0

etc....

I'm not sure why these libraries lack the "Qt_5" variable even though they're the 5.7.1 version of the libraries. As you can see, this isn't a path issue as it's successfully finding other libs in that directory just fine.

user1765354
  • 347
  • 1
  • 5
  • 21
  • You're attempting to run your binary with a binary-incompatible version of Qt. Unfortunately, different Linux distributions build Qt with different dependencies so each distribution likely has a binary-incompatible Qt. You need to compile your program on each system, or distribute it with a bundled prebuilt version of Qt. – Kuba hasn't forgotten Monica Aug 11 '17 at 18:19
  • Did you read [this](http://doc.qt.io/qt-5/linux-deployment.html)? – WindyFields Aug 12 '17 at 15:06
  • Here is a [similar thread](https://stackoverflow.com/questions/43707722/cant-run-qt-apps-version-qt-5-not-found?rq=1). – WindyFields Aug 12 '17 at 15:13

0 Answers0