junest
junest copied to clipboard
Unable to run Qt programs
Any Qt program I try to run won't work. For example:
[root@edham ~]$ kate
kate: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory
[root@edham ~]$
[root@edham ~]$ LD_PRELOAD=/usr/lib/libQt5Core.so.5.10.1 kate
ERROR: ld.so: object '/usr/lib/libQt5Core.so.5.10.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
kate: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory
[root@edham ~]$
[root@edham ~]$
[root@edham ~]$ kdiff3
QFSFileEngine::open: No file name specified
Qt: Session management error: None of the authentication protocols specified are supported
kdiff3(6482)/kdeui (kdelibs): Session bus not found
To circumvent this problem try the following command (with Linux and bash)
export $(dbus-launch)
KCrash: Application 'kdiff3' crashing...
KCrash: Attempting to start from kdeinit
KCrash: Connect sock_file=/user_data/RND/misa/.kde4/socket-edham/kdeinit4__0
Warning: connect() failed: : No such file or directory
KCrash: Attempting to start directly
KCrash failed to exec(), errno = 2
Note that kdiff3 uses Qt4. Also, non-Qt programs work just fine, for example I can run pidgin, gimp and firefox and I see no problems. Did I do something wrong or is this a known problem?
Obviously I made sure that library exists, I can md5sum it just fine from within the chroot so it's readable. I start junest with junest -f.
Edit: I tried with strace and I get this:
openat(AT_FDCWD, "/usr/lib/x86_64/libQt5Core.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64", 0x7ffc204fac70) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/libQt5Core.so.5", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240]\t\0\0\0\0\0"..., 832) = 832
lseek(3, 5203636, SEEK_SET) = 5203636
read(3, "\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\3\0\0\0\21\0\0\0\0\0\0\0", 32) = 32
close(3) = 0
stat("/usr/lib", {st_mode=S_IFDIR|0755, st_size=106496, ...}) = 0
writev(2, [{iov_base="kate", iov_len=4}, {iov_base=": ", iov_len=2}, {iov_base="error while loading shared libra"..., iov_len=36}, {iov_base=": ", iov_len=2}, {iov_base="libQt5Core.so.5", iov_len=15}, {iov_base=": ", iov_len=2}, {iov_base="cannot open shared object file", iov_len=30}, {iov_base=": ", iov_len=2}, {iov_base="No such file or directory", iov_len=25}, {iov_base="\n", iov_len=1}], 10kate: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory
) = 119
exit_group(127) = ?
+++ exited with 127 +++
I hope it's useful info.
I had the same issue, but it turns out that the Qt libraries are built for a newer kernel:
$ file /lib/libQt5Core.so.5.12.1
/lib/libQt5Core.so.5.12.1: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=3052a4732f8c2fa40cd1036064553a8c8a5984ac, for GNU/Linux 4.11.0, strippe
Running this way junest -p "-k 4.11" allows Qt applications to work (at least on RHEL6).