termux / proot

An chroot-like implementation using ptrace.
https://wiki.termux.com/wiki/PRoot
Other
751 stars 161 forks source link

"ERROR: /proc not mounted - LibreOffice is unlikely to work well if at all" even /proc is mounted #175

Closed Yonle closed 3 years ago

Yonle commented 3 years ago

Problem description

So i'm trying to run libreoffice with alpine proot with /proc mounted in guest. But failed to run with this error:

ERROR: /proc not mounted - LibreOffice is unlikely to work well if at all

Then libreoffice exit after that error.

Steps to reproduce

Expected behavior

The program ends up with error:

ERROR: /proc not mounted - LibreOffice is unlikely to work well if at all

Additional information

Application version:
0.117
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://termux.librehat.com/apt/termux-main/ stable main
# game-repo (sources.list.d/game.list)
deb https://packages.termux.org/apt/termux-games games stable
# science-repo (sources.list.d/science.list)
deb https://packages.termux.org/apt/termux-science science stable
# x11-repo (sources.list.d/x11.list)
deb https://packages.termux.org/apt/termux-x11 x11 main
Updatable packages:
apt/stable 2.3.8 aarch64 [upgradable from: 2.3.6]
ca-certificates/stable 20210603 all [upgradable from: 20210525]
command-not-found/stable 1.63 aarch64 [upgradable from: 1.62]
coreutils/stable 8.32-8 aarch64 [upgradable from: 8.32-7]
curl/stable 7.78.0 aarch64 [upgradable from: 7.77.0-3]
dash/stable 0.5.11.4 aarch64 [upgradable from: 0.5.11.3]
dialog/stable 1.3-20210621-0 aarch64 [upgradable from: 1.3-20210530-0]
diffutils/stable 3.8 aarch64 [upgradable from: 3.7-3]
libandroid-support/stable 28-1 aarch64 [upgradable from: 28]
libcurl/stable 7.78.0 aarch64 [upgradable from: 7.77.0-3]
libgnutls/stable 3.6.16 aarch64 [upgradable from: 3.6.15-3]
libidn2/stable 2.3.2 aarch64 [upgradable from: 2.3.0-2]
libnettle/stable 3.7.3 aarch64 [upgradable from: 3.7.2]
libnghttp2/stable 1.44.0 aarch64 [upgradable from: 1.43.0]
nano/stable 5.8 aarch64 [upgradable from: 5.7]
pcre/stable 8.45 aarch64 [upgradable from: 8.44-1]
termux-tools/stable 0.133-1 all [upgradable from: 0.130]
Android version:
8.1.0
Kernel build information:
Linux localhost 4.9.77+ #1 SMP PREEMPT Fri May 28 23:13:48 CST 2021 aarch64 Android
Device manufacturer:
vivo
Device model:
vivo 1820
ghost commented 3 years ago

that is likely SELinux issue which can be fixed by bind mounting fake /proc/version

Add this to your proot launch -b fake_proc_version:/proc/version

a copy of version file should be obtained somewhere

https://github.com/SDRausty/TermuxArch/issues/242

ghost commented 3 years ago

Yeah, that's what proot-distro do (faking /proc/version and other SELinux'ed data). If you are implementing your own way to run a chroot, you can take the ideas from its source.

This isn't really proot issue.

Yonle commented 3 years ago

Ah. So long android gets more restricted for stupid security reason. Also thanks for the answer 👍

ghost commented 3 years ago

stupid security reason

That's the reason why I still use Android ;)

freebrowser1 commented 3 months ago

3 years later ... I now have a non-rooted Oneplus 6 (Android 10) which issues this error. I tried this:

command+=" -b /proc"
# !!!
command+=" -b fake_proc_version:/proc/version" 
#

but got this error:

proot warning: can't sanitize binding "fake_proc_version": No such file or directory
pocketpenguin:~$ proot warning: can't sanitize binding "fake_proc_version": No such file or directory
Cleaning stale pidfile '/home/user/.vnc/localhost:1.pid'!

Running proot / Andronix on another device (rooted Nothing 2a, Android 14). Libreoffice started flawlessly. I did not use root in Termux / proot, but I have used root for disabling SELinux in Android.

So my conclusion is that with proot Libreoffice cannot be started, unless SELinux is turned off, and for that you have to be rooted.