termux / termux-x11

Termux X11 add-on application.
https://termux.dev
GNU General Public License v3.0
2.2k stars 318 forks source link

[Bug]: sh: error while loading shared libraries: libdl.so: cannot open shared object file: No such file or directory #753

Closed Francky-Tang closed 6 days ago

Francky-Tang commented 6 days ago

Problem description

when I run termux-x11 :1 -xstartup "/data/data/com.termux/files/usr/bin/dbus-laynch --exit-with-session xfce4-session"

it show sh: error while loading shared libraries: libdl.so: cannot open shared object file: No such file or directory sh: error while loading shared libraries: libc.so: cannot open shared object file: No such file or directory

after I make softlink in /lib/aarch64-linux-gnu ln s libdl.so.2 libdl.so ln s libc.so.6 libc.so

it show sh: /lib/aarch64-linux-gnu/libdl.so: version `LIBC' not found (required by /data/data/com.termux/files/usr/lib/libtermux-exec.so)

sh: /lib/aarch64-linux-gnu/libc.so.6: version `LIBC' not found (required by /data/data/com.termux/files/usr/lib/libtermux-exec.so)

I try TERMUX_X11_DEBUG=1 it show --------- beginning of main 11-22 19:58:39.974 3957 3957 E app_process: open file error 11-22 19:58:39.974 3957 3957 E app_process: open file error 11-22 19:58:39.974 3957 3957 E app_process: env CUST_POLICY_DIRS not set, use default: /system/emui:/system/global:/vendor/etc:/odm/etc:/product/etc:/hw_odm:/hw_oem:/data/cust:/cust_spec:/data/cota 11-22 19:58:40.140 3957 3957 E app_process: GcSupervisor: libimonitor.so not found!! 11-22 19:58:40.195 3957 3957 E Zygote : register_com_android_internal_os_Zygote result = 0 11-22 19:58:40.255 3957 3957 E HwResourcesImpl: getDescriptionXML IOException. 11-22 19:58:40.256 3957 3957 E CfgFilePolicy: **** ERROR: env CUST_POLICY_DIRS not set, use default 11-22 19:58:40.267 3957 3957 E HwResourcesImpl: getDescriptionXML IOException. 11-22 19:58:40.277 3957 3981 E CmdEntryPoint: Listening port 7892 11-22 19:58:40.430 3957 3980 E gles-renderer: There is no current context, renderer_set_buffer call is cancelled sh: /lib/aarch64-linux-gnu/libdl.so: version LIBC' not found (required by /data/data/com.termux/files/usr/lib/libtermux-exec.so) sh: /lib/aarch64-linux-gnu/libc.so.6: versionLIBC' not found (required by /data/data/com.termux/files/usr/lib/libtermux-exec.so) 3998 exited, status=1 11-22 19:58:45.431 3957 3980 E LorieNative: Server stopped (0) I dont know how to fix it , please help

What steps will reproduce the bug?

I installed termux-app_v0.118.1+github-debug_arm64.va8.apk in termux installed termux-x11-nighty-1.03.01-0-all.deb in termux proot-distro install ubuntu in ubuntu installed xfce4

What is the expected behavior?

No response

twaik commented 6 days ago

Your proot distro is not configured properly. Termux:X11 should NEVER link to glibc.

twaik commented 6 days ago

Also probably you should unset LD_PRELOAD environment variable to prevent libtermux-exec.so from being loaded.

Francky-Tang commented 5 days ago

@twaik thanks for your answer I can run termux-11 in termux env but it can not run in proot-distro ubuntu How should I configure proot-distro?

Francky-Tang commented 5 days ago

I find the way out it is wrong with the command ~ $ termux-x11 :1 -xstartup "dbus-launch --exit-with-session xfce4-session" but it can run with the command ~ $ termux-x11 :1 & ~ $ env DISPLAY=:1 dbus-launch --exit-with-session xfce4-session