Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install large packages in Termux-proot #568

Open
1 task done
SHLEM666 opened this issue Mar 16, 2024 · 7 comments
Open
1 task done

Can't install large packages in Termux-proot #568

SHLEM666 opened this issue Mar 16, 2024 · 7 comments
Labels

Comments

@SHLEM666
Copy link

SHLEM666 commented Mar 16, 2024

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

When I try to install SageMath package on Android device with conda or mamba the following error occurs

ERROR conda.core.link:_execute(945): An error occurred while installing package 'conda-forge::ipykernel-6.29.3-pyhd33586a_0'.

[Errno 2] No such file or directory: '/root/miniforge3/pkgs/ipykernel-6.29.3-pyhd33586a_0/site-packages/ipykernel/inprocess/__init__.py'

Moreover, at several installation attempts, this error occurs with different packages.
E.g. ipython, sagelib, python, giac, nbconvert, pythran, sphinx, notebook, rpy2 and many-many others.

Additionally, I tried splitting the SageMath package installation into parts, but result was the same.
The error always has the same form: No such file or directory: '/root/miniforge3/pkgs/package_name-version-build/some/path/__init__.py

Commands to reproduce

# in termux
yes | pkg update
yes | pkg install proot-distro
proot-distro install debian
proot-distro login debian

# in proot debian
apt update
yes | apt upgrade
curl -L -O https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh
bash Miniforge3-Linux-aarch64.sh

# relogin
exit
proot-distro login debian

conda create -n sage sage=10.2

Detailed information

The full installation output is too large to post here
output.txt

Environment info
 active environment : base
active env location : /root/miniforge3
        shell level : 1
   user config file : /root/.condarc
populated config files : /root/miniforge3/.condarc
      conda version : 23.11.0
conda-build version : not installed
     python version : 3.10.13.final.0
             solver : libmamba (default)
   virtual packages : __archspec=1=aarch64
                      __conda=23.11.0=0
                      __glibc=2.36=0
                      __linux=6.2.1=0
                      __unix=0=0
   base environment : /root/miniforge3  (writable)
  conda av data dir : /root/miniforge3/etc/conda
  conda av metadata url : None
       channel URLs : https://conda.anaconda.org/conda-forge/linux-aarch64
                      https://conda.anaconda.org/conda-forge/noarch
      package cache : /root/miniforge3/pkgs
                      /root/.conda/pkgs
   envs directories : /root/miniforge3/envs
                      /root/.conda/envs
           platform : linux-aarch64
         user-agent : conda/23.11.0 requests/2.31.0 CPython/3.10.13 Linux/6.2.1-PRoot-Distro debian/12.5 glibc/2.36 
 solver/libmamba conda-libmamba-solver/23.12.0 libmambapy/1.5.5
            UID:GID : 0:0
         netrc file : None
       offline mode : False

Hardware

  • Oneplus 7 (GM1900) Android 12
  • OnePlus 10 Pro (NE2215) Android 14

Software

  • Termux (0.118) + proot-distro
    • Debian (bookworm) aarch64
    • Archlinux aarch64
  • Conda (Linux-aarch64)
    • Miniforge3 (23.11.0)
    • Miniconda3 (py312_24.1.2-0)

Note

On Raspberry Pi 3 Model B (aarch64, 1Gb ram) + Raspberry OS lite 64 bit
Installation with the same commands completes successfully

@SHLEM666 SHLEM666 changed the title Fails to install large packages in Termux-proot Can't install large packages in Termux-proot Mar 16, 2024
@hmaarrfk
Copy link
Contributor

I think there might have been a bug in conda and libmamba's solver in the previous version.

Try the latest version of miniforge's installer (it updates the default package).

Apparently the next version should be even better in terms of memory limitations.

PS. not many of us use Termux so that is why we are all hesitant to reply

@SHLEM666
Copy link
Author

Thank you, I didn’t expect a quick response)).

Miniforge3 v24.1.2-0 test showed that the error still occurs.

@hmaarrfk hmaarrfk added the linux label Jun 7, 2024
@mistune
Copy link

mistune commented Sep 17, 2024

@SHLEM666 were you able to resolve this error? I am still seeing it in 24.7.1

@mistune
Copy link

mistune commented Sep 20, 2024

@hmaarrfk I would like to help solve this issue by testing. What logs do I need to collect and how do I enable those logs?

@hmaarrfk
Copy link
Contributor

the best thing to do would be to help create some kind of docker image that recreates the issue so we all be on the same page.

without that, we are going to be very slow at iterating.

@SHLEM666
Copy link
Author

@SHLEM666 were you able to resolve this error? I am still seeing it in 24.7.1

No, I faild to solve this problem.

@SHLEM666
Copy link
Author

SHLEM666 commented Sep 22, 2024

the best thing to do would be to help create some kind of docker image that recreates the issue so we all be on the same page.

without that, we are going to be very slow at iterating.

According to your idea, I tried to use termux-docker aarch64 image.

docker pull termux/termux-docker:aarch64
docker run -it termux/termux-docker:aarch64
# default mirror is not works for me
echo "deb https://packages.termux.dev/apt/termux-main stable main" > $PREFIX/etc/apt/sources.list
yes | apt update
yes | apt upgrade
yes | pkg install proot-distro
proot-distro install debian

This attempt fails at proot-distro install step with the following error:

Error: the rootfs of distribution 'daebian' has unexpected structure (no /etc directory). Make sure that variable TARBALL_STRIP_OPT specified in distribution plug-in is correct.

I've found topic with similar problem. But in my case, the reason is not in the wrong PATH value.

According to the result of the next two commands, the error reason may be related to bad linking.
(There is only 636 - 658 lines of log.txt under the first spoiler)

bash -x proot-distro install debian |& tee log.txt
[*] Extracting rootfs, please wait...
+ set +e
+ grep -v /linkerconfig/
+ proot --link2symlink tar -C /data/data/com.termux/files/usr/var/lib/proot-distro/installed-rootfs/debian --warning=no-unknown-keyword --delay-directory-restore --preserve-permissions --strip=1 -xf /data/data/com.termux/files/usr/var/lib/proot-distro/dlcache/debian-bookworm-aarch64-pd-v4.7.0.tar.xz --exclude=dev
proot error: ptrace(TRACEME): Function not implemented
proot error: execve("/data/data/com.termux/files/usr/bin/tar"): Function not implemented
proot info: possible causes:
  * the program is a script but its interpreter (eg. /bin/sh) was not found;
  * the program is an ELF but its interpreter (eg. ld-linux.so) was not found;
  * the program is a foreign binary but qemu was not specified;
  * qemu does not work correctly (if specified);
  * the loader was not found or doesn't work.
fatal error: see `proot --help`.
+ set -e
+ '[' '!' -e /data/data/com.termux/files/usr/var/lib/proot-distro/installed-rootfs/debian/etc ']'
+ msg
+ echo -e
+ msg 'Error: the rootfs of distribution '\''debian'\'' has unexpected structure (no /etc directory). Make sure that variable TARBALL_STRIP_OPT specified in distribution plug-in is correct.'
+ echo -e 'Error: the rootfs of distribution '\''debian'\'' has unexpected structure (no /etc directory). Make sure that variable TARBALL_STRIP_OPT specified in distribution plug-in is correct.'
Error: the rootfs of distribution 'debian' has unexpected structure (no /etc directory). Make sure that variable TARBALL_STRIP_OPT specified in distribution plug-in is correct.
+ msg
+ echo -e
...
proot --link2symlink tar --version
proot error: ptrace(TRACEME): Function not implemented
proot error: execve("/data/data/com.termux/files/usr/bin/tar"): Function not implemented
proot info: possible causes:
  * the program is a script but its interpreter (eg. /bin/sh) was not found;
  * the program is an ELF but its interpreter (eg. ld-linux.so) was not found;
  * the program is a foreign binary but qemu was not specified;
  * qemu does not work correctly (if specified);
  * the loader was not found or doesn't work.
fatal error: see `proot --help`.

That's all for now. Research continues.

Note

I use Win10 + Docker Desktop 4.34.2 (167172).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants