Cannot get any query output from executable "/opt/Qt/6.2.2/gcc_64/bin/qmake"
-
I wonder if there are some compatibility issues...
Did you try to execute qmake directly from what could be installed to see what is going wrong there ? -
I wonder if there are some compatibility issues...
Did you try to execute qmake directly from what could be installed to see what is going wrong there ?@SGaist I just followed the instructions for building Qt5 from source. At this point, I don't care if it's Qt5 or Qt6.
My newqmake
is installed at:/opt/qt5-build/qtbase/bin/qmake
. It appears that it is working correctly, but there is no QtCreator in my build.I will try to install from the online installer again, ignore the errors, and see what
qmake
does.BACKGROUND
I have a CMake project that I created on a Ubuntu machine. It works. All I need to do is to install Qt on my CentOS 7 machine and build this project.
-
I installed again and ignored the error that I posted earlier.
After installing6.2.2
again, upon trying to run QtCreator, I receive the following error:[devuser@localhost ~]$ ./Qt/Tools/QtCreator/bin/qtcreator ./Qt/Tools/QtCreator/bin/qtcreator: error while loading shared libraries: libQt6Core.so.6: cannot open shared object file: No such file or directory
I do have that library...
[devuser@localhost ~]$ locate libQt6Core.so.6 /home/devuser/Qt/6.2.2/gcc_64/lib/libQt6Core.so.6 /home/devuser/Qt/6.2.2/gcc_64/lib/libQt6Core.so.6.2.2 /home/devuser/Qt/Tools/QtCreator/lib/Qt/lib/libQt6Core.so.6 /home/devuser/Qt/Tools/QtCreator/lib/Qt/lib/libQt6Core.so.6.2.1
-
I installed again and ignored the error that I posted earlier.
After installing6.2.2
again, upon trying to run QtCreator, I receive the following error:[devuser@localhost ~]$ ./Qt/Tools/QtCreator/bin/qtcreator ./Qt/Tools/QtCreator/bin/qtcreator: error while loading shared libraries: libQt6Core.so.6: cannot open shared object file: No such file or directory
I do have that library...
[devuser@localhost ~]$ locate libQt6Core.so.6 /home/devuser/Qt/6.2.2/gcc_64/lib/libQt6Core.so.6 /home/devuser/Qt/6.2.2/gcc_64/lib/libQt6Core.so.6.2.2 /home/devuser/Qt/Tools/QtCreator/lib/Qt/lib/libQt6Core.so.6 /home/devuser/Qt/Tools/QtCreator/lib/Qt/lib/libQt6Core.so.6.2.1
@Jorge_Adan
Start by runningldd ./Qt/Tools/QtCreator/bin/qtcreator
. Look through the output forlibQt6Core.so.6
. Assuming from what you say that is does not say "file not found", look through all its dependencies and see whether one of them is not found. That can lead to the error message reporting it onlibQt6Core.so.6
when in fact the issue is another file.I also note your output shows different versions of
libQt6Core.so.6.2.x
in different places. I don't know whether the different versions is problematic. You can runldd
on those too. -
@Jorge_Adan
Start by runningldd ./Qt/Tools/QtCreator/bin/qtcreator
. Look through the output forlibQt6Core.so.6
. Assuming from what you say that is does not say "file not found", look through all its dependencies and see whether one of them is not found. That can lead to the error message reporting it onlibQt6Core.so.6
when in fact the issue is another file.I also note your output shows different versions of
libQt6Core.so.6.2.x
in different places. I don't know whether the different versions is problematic. You can runldd
on those too.@JonB Here is my output, using ldd:
w[devuser@localhost ~]$ ldd ./Qt/Tools/QtCreator/bin/qtcreator | grep -i libqt6core.so.6 ./Qt/Tools/QtCreator/bin/qtcreator: /lib64/libz.so.1: version `ZLIB_1.2.9' not found (required by /home/devuser/./Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Gui.so.6) ./Qt/Tools/QtCreator/bin/qtcreator: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /home/devuser/./Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Gui.so.6) libQt6Core.so.6 => not found libQt6Core.so.6 => not found libQt6Core.so.6 => not found libQt6Core.so.6 => not found libQt6Core.so.6 => not found libQt6Core.so.6 => not found libQt6Core.so.6 => not found libQt6Core.so.6 => not found libQt6Core.so.6 => not found libQt6Core.so.6 => not found libQt6Core.so.6 => not found libQt6Core.so.6 => not found libQt6Core.so.6 => not found
-
@JonB Here is my output, using ldd:
w[devuser@localhost ~]$ ldd ./Qt/Tools/QtCreator/bin/qtcreator | grep -i libqt6core.so.6 ./Qt/Tools/QtCreator/bin/qtcreator: /lib64/libz.so.1: version `ZLIB_1.2.9' not found (required by /home/devuser/./Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Gui.so.6) ./Qt/Tools/QtCreator/bin/qtcreator: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /home/devuser/./Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Gui.so.6) libQt6Core.so.6 => not found libQt6Core.so.6 => not found libQt6Core.so.6 => not found libQt6Core.so.6 => not found libQt6Core.so.6 => not found libQt6Core.so.6 => not found libQt6Core.so.6 => not found libQt6Core.so.6 => not found libQt6Core.so.6 => not found libQt6Core.so.6 => not found libQt6Core.so.6 => not found libQt6Core.so.6 => not found libQt6Core.so.6 => not found
@Jorge_Adan
You will have to await others to comment on your two lines in green. Maybe they are the issue, I don't know.
I am still a little unsure on whether thelibQt6Core.so.6 => not found
messages are that that it cannot find that actual file or dependencies for it. You might like to look through the output paged intomore
/less
instead ofgrep
ping to understand just what it is telling you. -
@Jorge_Adan centOS7 could be the issue. You may try to build it from Qt source. Or upgrade centOS to the latest.
-
I installed again and ignored the error that I posted earlier.
After installing6.2.2
again, upon trying to run QtCreator, I receive the following error:[devuser@localhost ~]$ ./Qt/Tools/QtCreator/bin/qtcreator ./Qt/Tools/QtCreator/bin/qtcreator: error while loading shared libraries: libQt6Core.so.6: cannot open shared object file: No such file or directory
I do have that library...
[devuser@localhost ~]$ locate libQt6Core.so.6 /home/devuser/Qt/6.2.2/gcc_64/lib/libQt6Core.so.6 /home/devuser/Qt/6.2.2/gcc_64/lib/libQt6Core.so.6.2.2 /home/devuser/Qt/Tools/QtCreator/lib/Qt/lib/libQt6Core.so.6 /home/devuser/Qt/Tools/QtCreator/lib/Qt/lib/libQt6Core.so.6.2.1
@Jorge_Adan You might not set /home/devuser/Qt/6.2.2/gcc_64/lib to LD_LIBRARY_PATH
-
@Jorge_Adan You might not set /home/devuser/Qt/6.2.2/gcc_64/lib to LD_LIBRARY_PATH
@JoeCFD Yes, I've tried that. I receive the same error.
-
@JoeCFD Yes, I've tried that. I receive the same error.
@Jorge_Adan You might add it to the wrong spot. Can you please tell how you added it? Also show the full list of your home dir by command ls -al.
Normally you do not install third party in /home/devuser/. Instead, install them under somewhere like /opt/thirdParties which is user name independent.First thing, try this on your terminmal:
export LD_LIBRARY_PATH=/home/devuser/Qt/6.2.2/gcc_64/lib:$LD_LIBRARY_PATH
./Qt/Tools/QtCreator/bin/qtcreatoryou also need to add /Qt/Tools/QtCreator/bin and /home/devuser/Qt/6.2.2/gcc_64/bin to PATH
Check your gcc version by
gcc --version
I believe it is 4.8.5 which can not support Qt 6. Qt 6 needs C++17 -
@Jorge_Adan You might add it to the wrong spot. Can you please tell how you added it? Also show the full list of your home dir by command ls -al.
Normally you do not install third party in /home/devuser/. Instead, install them under somewhere like /opt/thirdParties which is user name independent.First thing, try this on your terminmal:
export LD_LIBRARY_PATH=/home/devuser/Qt/6.2.2/gcc_64/lib:$LD_LIBRARY_PATH
./Qt/Tools/QtCreator/bin/qtcreatoryou also need to add /Qt/Tools/QtCreator/bin and /home/devuser/Qt/6.2.2/gcc_64/bin to PATH
Check your gcc version by
gcc --version
I believe it is 4.8.5 which can not support Qt 6. Qt 6 needs C++17@JoeCFD In
~/.bash_profile
:export LD_LIBRARY_PATH=/usr/local/lib64:/home/devuser/Qt/6.2.2/gcc_64/lib/:$LD_LIBRARY_PATH
Then in terminal:
source ~/.bash_profile
.I also create an alias:
alias qtcreator=$HOME/Qt/Tools/QtCreator/bin/qtcreator
in order to force the newly installed
qtcreator
get called. If I don't, it calls:/usr/bin/qtcreator
, which was installed as part of the CentOS 7 build as Qt4.I still get the same error:
[devuser@localhost ~]$ qtcreator /home/devuser/Qt/Tools/QtCreator/bin/qtcreator: error while loading shared libraries: libQt6Core.so.6: cannot open shared object file: No such file or directory
Concerning gcc:
[devuser@localhost ~]$ gcc --version gcc (GCC) 10.1.0
-
@JoeCFD In
~/.bash_profile
:export LD_LIBRARY_PATH=/usr/local/lib64:/home/devuser/Qt/6.2.2/gcc_64/lib/:$LD_LIBRARY_PATH
Then in terminal:
source ~/.bash_profile
.I also create an alias:
alias qtcreator=$HOME/Qt/Tools/QtCreator/bin/qtcreator
in order to force the newly installed
qtcreator
get called. If I don't, it calls:/usr/bin/qtcreator
, which was installed as part of the CentOS 7 build as Qt4.I still get the same error:
[devuser@localhost ~]$ qtcreator /home/devuser/Qt/Tools/QtCreator/bin/qtcreator: error while loading shared libraries: libQt6Core.so.6: cannot open shared object file: No such file or directory
Concerning gcc:
[devuser@localhost ~]$ gcc --version gcc (GCC) 10.1.0
@Jorge_Adan In order to call your installed qt creator, you do this:
export PATH=$HOME/Qt/Tools/QtCreator/bin/:$PATH:.:
then your installed one will be in front of /usr/bin/qtcreatoryou need to do the same thing for LD_LIBRARY_PATH. There is order problem here. PATH settings decide which one will be looked for or executed first. It is important to know this since you have different Qt installations.
-
@Jorge_Adan said in Cannot get any query output from executable "/opt/Qt/6.2.2/gcc_64/bin/qmake":
[devuser@localhost ~]$ gcc --version
gcc (GCC) 10.1.0
gcc 10.1.0 may be good enough for Qt 6. Good luck! -
@Jorge_Adan In order to call your installed qt creator, you do this:
export PATH=$HOME/Qt/Tools/QtCreator/bin/:$PATH:.:
then your installed one will be in front of /usr/bin/qtcreatoryou need to do the same thing for LD_LIBRARY_PATH. There is order problem here. PATH settings decide which one will be looked for or executed first. It is important to know this since you have different Qt installations.
@JoeCFD Yes, I already had my PATH setup like that.
-
@JoeCFD Yes, I already had my PATH setup like that.
@Jorge_Adan show ldd /home/devuser/Qt/Tools/QtCreator/bin/qtcreator
qtcreator uses relative path for qt libs. -
@JoeCFD Yes, I already had my PATH setup like that.
@Jorge_Adan
See the discussion now going on in https://forum.qt.io/topic/132610/qtcreator-6-0-can-t-start, I think it's same as yours?