Unsolved /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version ‘Qt_5.14’ not found
-
Hello,
I am on Kubuntu.
I compiled my program with QTCreator.
I take the executable and I try to run it on another PC that has Kubuntu. I run it from the cmd line and it says:/usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version ‘Qt_5.14’ not found (required by ./myprogram)
I looked at
https://doc.qt.io/qt-5/linux-deployment.htmlI did
cd /opt/Qt
./configure -static -prefix /opt/Qt
and it says that
bash: ./configure: No such file or directory -
@stretchthebits You did not say which Qt version you used to build your app. I guess 5.14?
You do NOT need to build Qt by yourself to deploy your app!
Please read "Creating the Application Package" in the link you posted. -
To make it clear for you.
You have Qt framework in your machine you use to build the app.
It builds the app as a shared application. means it depends on other Qt and System libraries you used to compile or generate the app in your machine.If you try to run the app in another machine It will not run unless you have the same Qt and system lib version installed in that machine. And that is what they call it Dependency.
So let say I Build My app called FoxApp using QtCreator.
The generated file is
FoxApp
If i run it in QtCreator it will run without any issue.
, because QtCreator loads the dependencies.If I try to run in the folder generated it will not run if the generated app can not find the dependencies in your machine or other machines
How to know which dependencies i need to run my app:
ldd -v ./FoxApp
Which you have to ship them all together with your app.
Other way to send it one file is to use static build which will compile and ship all requirements in one binary file.
But this could be tricky in Linux.
so you need to learn how to ship your full app with all its dependencies :)
So read here to learn more about static build and their information for you to understand it.
-
Thank you Foxoman,
I tried your method and it stopped at
cd ~/QtStatic/5.14.0/build; ~/QtStatic/5.14.0/Src/configure -v -static -release -ltcg -optimize-size -no-pch -prefix ~/Qt5static/5.14.0/ -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -qt-xcb -qt-harfbuzz -make libs -nomake tools -nomake examples -nomake tests -opensource -confirm-license -skip qtwebengine -dbus-linked -no-rpath -openssl-linked -opengl desktop -sysconfdir "/etc/xdg" -no-qml-debug -feature-freetype -fontconfig -feature-relocatable -stripNote: Overriding option 'freetype' with 'yes' (was: 'qt')
Note: Also available for Linux: linux-clang linux-icc
Note: Using static linking will disable the use of dynamically
loaded plugins. Make sure to import all needed static plugins,
or compile needed modules into the library.Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.
WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.
Either ensure that llvm-config is in your PATH environment variable, or set LLVM_INSTALL_DIR to the location of your llvm installation.
On Linux systems, you may be able to install libclang by installing the libclang-dev or libclang-devel package, depending on your distribution.
On macOS, you can use Homebrew's llvm package.
On Windows, you must set LLVM_INSTALL_DIR to the installation path.ERROR: Feature 'dbus-linked' was enabled, but the pre-condition 'features.dbus && libs.dbus' failed.
ERROR: Feature 'openssl-linked' was enabled, but the pre-condition '!features.securetransport && !features.schannel && libs.openssl' failed.
ERROR: Feature 'xcb' was enabled, but the pre-condition 'features.thread && features.xkbcommon && libs.xcb' failed.
ERROR: Feature 'fontconfig' was enabled, but the pre-condition '!config.msvc && features.system-freetype && libs.fontconfig' failed.