View Full Version : libQt5Core.so.5: version `Qt_5.12' not found error
anirudh_92
19th June 2019, 16:51
Hi all,
I installed Qt 5.12.1 on Ubuntu 18.04. I am getting the following error when i try to run or debug one of my projects. I am working on this project from more than 2-3 months and everything was working fine until a couple of hours ago. However, other projects are building and running fine with this same version Qt 5.12. The program exits with only this message displayed on the application output window.
/path/to/Qt/project: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.12' not found (required by /path/to/Qt/project)
I cannot figure out the problem since it was working fine until some time ago. Any help will be greatly appreciated.
Thank you in advance.
anda_skoa
20th June 2019, 09:30
I installed Qt 5.12.1 on Ubuntu 18.04.
Using the Qt installer?
/path/to/Qt/project: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.12' not found (required by /path/to/Qt/project)
This says that the program is trying to use the system Qt (installed from distribution packages).
I cannot figure out the problem since it was working fine until some time ago.
You might have always used the system Qt without realizing it and all was fine since it happened to be the same version.
If Ubuntu has moved to a different version now then this suddenly stopped working.
Make sure you are using the correct qmake to create the build files.
You might also have to set the LD_LIBRARY_PATH variable to point to your Qt installation
Cheers,
_
anirudh_92
1st July 2019, 14:08
Using the Qt installer?
_
Hi,
Thanks for your reply. Yes, i installed using the qt installer.
This says that the program is trying to use the system Qt (installed from distribution packages).
You might have always used the system Qt without realizing it and all was fine since it happened to be the same version.
If Ubuntu has moved to a different version now then this suddenly stopped working.
Make sure you are using the correct qmake to create the build files.
You might also have to set the LD_LIBRARY_PATH variable to point to your Qt installation
Cheers,
_
when i look at tools -> options in qt creator, it points the qmake location to gcc_64 folder inside where qt is installed (home/anirudh/opt/Qt/). I assume this is the correct qmake that is being used.
I do not understand what the LD_LIBRARY_PATH should be pointing to. Because i cannot find any libraries or binary files inside the Qt installation folder. Plase let me know if the reply is not clear.
Thanks and awaiting a reply,
Anirudh
Added after 1 19 minutes:
Hi,
Thanks for your reply. Yes, i installed using the qt installer.
when i look at tools -> options in qt creator, it points the qmake location to gcc_64 folder inside where qt is installed (home/anirudh/opt/Qt/). I assume this is the correct qmake that is being used.
I do not understand what the LD_LIBRARY_PATH should be pointing to. Because i cannot find any libraries or binary files inside the Qt installation folder. Plase let me know if the reply is not clear.
Thanks and awaiting a reply,
Anirudh
It seems like i cannot edit my reply. So, I am posting another comment.
EDIT:
I figured out that my local qt installation is version 5.12. While /usr/lib/x86_64-linux-gnu/ folder contains Qt libraries related to version 5.9. I added the path /path/to/qt5.12/gcc_64/lib to LD_LIBRARY_PATH through .bashrc file. However, Qt seems to be still having problems finding libraries in my Qt installation folder. Is there any way to tell Qt to use the libraries in my Qt installtion folder instead of looking in /usr/lib/x86_64-linux-gnu/ ?
Thanks,
Anirudh
anda_skoa
1st July 2019, 17:55
Make sure LD_LIBRARY_PATH is set in the environment you run QtCreator from, e.g. by starting qtcreator from a shell that has this variable set.
You can also use "ldd" to check on your executable which library it is linking to
$ ldd /your/program
Cheers,
_
anirudh_92
4th July 2019, 11:07
Make sure LD_LIBRARY_PATH is set in the environment you run QtCreator from, e.g. by starting qtcreator from a shell that has this variable set.
You can also use "ldd" to check on your executable which library it is linking to
$ ldd /your/program
Cheers,
_
Hi,
Thanks for the reply. I was using a desktop shortcut icon for launching Qt creator. For now, I moved the system Qt libraries (relating to Qt 5.9) to another folder outside the LD_LIBRARY_PATH and everything is working fine as Qt detects the local installation libraries (relating to Qt 5.12).
Thanks,
Anirudh
anda_skoa
5th July 2019, 09:13
For now, I moved the system Qt libraries (relating to Qt 5.9) to another folder
Moving system libraries is a very bad idea.
Every update will restore them and you are back in the previous position.
Also things might rely on them being present
You can set LD_LIRBARY_PATH in the "Projects" setting in QtCreator or you create a launcher script that sets LD_LIBRARY_PATH and then use this in your desktop icon instead of QtCreator
Cheers,
_
anirudh_92
5th July 2019, 09:46
Moving system libraries is a very bad idea.
Every update will restore them and you are back in the previous position.
Also things might rely on them being present
You can set LD_LIRBARY_PATH in the "Projects" setting in QtCreator or you create a launcher script that sets LD_LIBRARY_PATH and then use this in your desktop icon instead of QtCreator
Cheers,
_
Hi,
I moved the system library files back to their original location and endited the LD_LIBRARY_PATH under the "projects" settings. It works fine. Thank you!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.