libQt5Core.so.5: version `Qt_5.12' not found error
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.
Re: libQt5Core.so.5: version `Qt_5.12' not found error
Quote:
Originally Posted by
anirudh_92
I installed Qt 5.12.1 on Ubuntu 18.04.
Using the Qt installer?
Quote:
Originally Posted by
anirudh_92
/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).
Quote:
Originally Posted by
anirudh_92
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,
_
Re: libQt5Core.so.5: version `Qt_5.12' not found error
Quote:
Originally Posted by
anda_skoa
Using the Qt installer?
_
Hi,
Thanks for your reply. Yes, i installed using the qt installer.
Quote:
Originally Posted by
anda_skoa
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:
Quote:
Originally Posted by
anirudh_92
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
Re: libQt5Core.so.5: version `Qt_5.12' not found error
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,
_
Re: libQt5Core.so.5: version `Qt_5.12' not found error
Quote:
Originally Posted by
anda_skoa
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
Re: libQt5Core.so.5: version `Qt_5.12' not found error
Quote:
Originally Posted by
anirudh_92
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,
_
Re: libQt5Core.so.5: version `Qt_5.12' not found error
Quote:
Originally Posted by
anda_skoa
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!