Mirrored from upstream 1jehuang/jcode — Issue #235 by @luciusrockwing
Original state: open
Created: 2026-05-21T02:02:11Z · Updated: 2026-05-21T02:02:11Z
This issue is an auto-mirrored copy. Comments and edits here are local to quangdang46/jcode — do not expect them to propagate upstream.
jcode fails to execute in Termux due to missing dynamic linker and LD_PRELOAD conflict
Problem
After installing jcode via the official install script, running jcode resulted in:
bash: /data/data/com.termux/files/home/.local/bin/jcode: cannot execute: required file not found
Investigation showed the binary is a dynamically linked ELF expecting the interpreter /lib/ld-linux-aarch64.so.1, which does not exist in Termux. Additionally, Termux preloads libtermux-exec-ld-preload.so via LD_PRELOAD, which is incompatible with the glibc libc used by the binary, causing:
/data/data/com.termux/files/home/.jcode/builds/versions/0.12.3/jcode: /data/data/com.termux/files/usr/glibc/lib/libc.so.6: version `LIBC' not found (required by /data/data/com.termux/files/usr/lib/libtermux-exec-ld-preload.so)
Solution
Two steps were required:
1. Patch the interpreter
Use patchelf to change the ELF interpreter to the glibc dynamic linker that does exist in the Termux glibc installation:
patchelf --set-interpreter /data/data/com.termux/files/usr/glibc/lib/ld-linux-aarch64.so.1 ~/.local/bin/jcode
(Replace ~/.local/bin/jcode with the actual path if different; you can find it with which jcode.)
2. Avoid the conflicting LD_PRELOAD
Run jcode with an empty LD_PRELOAD environment variable to prevent loading the Termux-specific preload library:
Making it permanent
To avoid typing LD_PRELOAD= each time, add an alias to your shell startup file (~/.bashrc or ~/.zshrc):
alias jcode='LD_PRELOAD= jcode'
Then reload the configuration:
source ~/.bashrc # or source ~/.zshrc
Now you can simply run:
Verification
After applying the fix, jcode should start and display the telemetry notice followed by a provider login prompt:
jcode collects anonymous usage statistics (install count, version, OS,
session activity, tool counts, and crash/exit reasons). No code, filenames,
prompts, or personal data is sent.
To opt out: export JCODE_NO_TELEMETRY=1
Details: https://github.com/1jehuang/jcode/blob/master/TELEMETRY.md
No credentials found. Let's log in!
Choose a provider:
...
Notes
- If you reinstall or update jcode, repeat the
patchelf step on the new binary.
- The alias will continue to work after re‑patching.
jcode fails to execute in Termux due to missing dynamic linker and LD_PRELOAD conflict
Problem
After installing jcode via the official install script, running
jcoderesulted in:Investigation showed the binary is a dynamically linked ELF expecting the interpreter
/lib/ld-linux-aarch64.so.1, which does not exist in Termux. Additionally, Termux preloadslibtermux-exec-ld-preload.soviaLD_PRELOAD, which is incompatible with the glibc libc used by the binary, causing:Solution
Two steps were required:
1. Patch the interpreter
Use
patchelfto change the ELF interpreter to the glibc dynamic linker that does exist in the Termux glibc installation:patchelf --set-interpreter /data/data/com.termux/files/usr/glibc/lib/ld-linux-aarch64.so.1 ~/.local/bin/jcode(Replace
~/.local/bin/jcodewith the actual path if different; you can find it withwhich jcode.)2. Avoid the conflicting LD_PRELOAD
Run jcode with an empty
LD_PRELOADenvironment variable to prevent loading the Termux-specific preload library:Making it permanent
To avoid typing
LD_PRELOAD=each time, add an alias to your shell startup file (~/.bashrcor~/.zshrc):Then reload the configuration:
Now you can simply run:
Verification
After applying the fix,
jcodeshould start and display the telemetry notice followed by a provider login prompt:Notes
patchelfstep on the new binary.