termux-pacman/glibc-packages

[Bug]: Library file cannot be found

Closed this issue · 5 comments

Problem description

Running "export PATH=${GLIBC_PERFIX}/bin" and then executing "ls" reports error ls
"ls: Error loading shared library: libdl.so: Unable to open shared object file: No such file or directory"

Also, I'd like to go directly to the "Termux" session when I start it.

System information

~ $ termux-info
The program termux-info is not installed. Install it by executing:
pkg install termux-tools
~ $ pkg install termux-tools
The program pkg is not installed. Install it by executing:
pkg install termux-tools

Duplication of #38 (comment)

In short, you forgot to run the glibc-runner shell:

pkg install glibc-runner # installation
grun -s # launch shell

Also, I'd like to go directly to the "Termux" session when I start it.

What do you mean? You want to have auto access to glibc commands when you launch the Termux application?

#38 的复制(注释)

简而言之,您忘记运行 shell:glibc-runner

pkg install glibc-runner # installation
grun -s # launch shell

另外,我想在启动时直接进入“Termux”会话。

你是什么意思?您想在启动 Termux 应用程序时自动访问 glibc 命令吗?

Yes, I'd like to start a terminal session with grun instead of bash, plus I have a feeling that the termux native software uses something other than glibc, so I'm not going to use that!

Yes, I'd like to start a terminal session with grun instead of bash

Well then you can configure the termux-login.sh file:

echo "unset LD_PRELOAD" >> /data/data/com.termux/files/usr/etc/termux-login.sh
echo "PATH=/data/data/com.termux/files/usr/glibc/bin:$PATH" >> /data/data/com.termux/files/usr/etc/termux-login.sh

plus I have a feeling that the termux native software uses something other than glibc, so I'm not going to use that!

By default, termux uses bionic-based commands. They are different from glibc commands, especially when it comes to libraries.

Yes, I'd like to start a terminal session with grun instead of bash

Well then you can configure the termux-login.sh file:

echo "unset LD_PRELOAD" >> /data/data/com.termux/files/usr/etc/termux-login.sh
echo "PATH=/data/data/com.termux/files/usr/glibc/bin:$PATH" >> /data/data/com.termux/files/usr/etc/termux-login.sh

plus I have a feeling that the termux native software uses something other than glibc, so I'm not going to use that!

By default, termux uses bionic-based commands. They are different from glibc commands, especially when it comes to libraries.

A new problem has arisen.
chsh: cannot open /data/data/com.termux/files/usr/glibc/etc/passwd: No such file or directory
bad interpreter: /usr/bin/env: no such file or directory

chsh: cannot open /data/data/com.termux/files/usr/glibc/etc/passwd: No such file or directory

You can create this file yourself:

echo "{NAME}:x:{UID}:{GID}::{SHELL}:{HOME}" >> $PREFIX/glibc/etc/passwd

bad interpreter: /usr/bin/env: no such file or directory

I forgot to tell you that due to the fact that for glibc commands to work it is necessary to remove the LD_PRELOAD value, then after removal some scripts will not work. To fix this you will need to either edit them (set up the correct paths) or return to the normal shell.