mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 11:36:07 +01:00
Unset LD_LIBRARY_PATH and LD_PRELOAD to avoid invalid ELF header
The error
/data/data/com.termux/files/nix/bin/sh: error while loading shared libraries: /nix/store/6afvzgx3himw7584k9zmfxmqd86b1z7j-glibc-2.34-210/lib/libc.so: invalid ELF header
it seems to happen because of
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
which doesn't support the .so file being a linker script
.../files/nix $ cat ./nix/store/6afvzgx3himw7584k9zmfxmqd86b1z7j-glibc-2.34-210/lib/libc.so
/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
OUTPUT_FORMAT(elf64-littleaarch64)
GROUP ( /nix/store/6afvzgx3himw7584k9zmfxmqd86b1z7j-glibc-2.34-210/lib/libc.so.6 /nix/store/6afvzgx3himw7584k9zmfxmqd86b1z7j-glibc-2.34-210/lib/libc_nonshared.a AS_NEEDED ( /nix/store/6afvzgx3himw7584k9zmfxmqd86b1z7j-glibc-2.34-210/lib/ld-linux-aarch64.so.1 ) )
This commit is contained in:
parent
f6ecf3b932
commit
55cc8f0210
1 changed files with 5 additions and 0 deletions
|
|
@ -46,6 +46,11 @@ writeScript "login" ''
|
|||
BIND_PROC_UPTIME=""
|
||||
fi
|
||||
|
||||
# See https://github.com/CypherpunkArmory/UserLAnd/issues/1333
|
||||
unset LD_LIBRARY_PATH
|
||||
unset LD_PRELOAD
|
||||
|
||||
|
||||
exec ${installationDir}/bin/proot-static \
|
||||
-b ${installationDir}/nix:/nix \
|
||||
-b ${installationDir}/bin:/bin! \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue