fsquillace / junest

The lightweight Arch Linux based distro that runs, without root privileges, on top of any other Linux distro.
GNU General Public License v3.0
2.08k stars 111 forks source link

proot fakeroot doesn't work #293

Open Thrashophil opened 2 years ago

Thrashophil commented 2 years ago

I have a problem with junest p on a remote computer, where I log in via ssh. When I want to run for example sudo pacman -Syy, I get the following error:

fakeroot: preload library `libfakeroot.so' not found, aborting.

As far as I understand, junest comes with an own fakeroot and directory management and is therefore independent of the existence of fakeroot on the host machine.

When I first run junest p -f and then pacman -Syy, I get

error: failed to initialize alpm library:
(root: /, dbpath: /var/lib/pacman/)
could not find or read directory

What can I do?

fsquillace commented 2 years ago

Very strange, I guess you installed a fresh junest image and the latest junest command, right?

Which linux distro has the host machine?

Thrashophil commented 2 years ago

The host machine has Ubuntu 20.04.4 LTS. Yes, I tried it again by deleting all junest folders and copying this git repository to the host machine. Same problem.

What do you mean by installing the latest junest command? In my .bashrc, there has been always the line export PATH=~/.local/share/junest/bin:$PATH since the beginning.

fsquillace commented 2 years ago

What do you mean by installing the latest junest command?

I mean to run:

cd ~/.local/share/junest
git pull origin master

This is very strange because in Ubuntu it should work very well. What if you use junest ns instead?

Thrashophil commented 2 years ago

I get the following:

From https://github.com/fsquillace/junest
 * branch            master     -> FETCH_HEAD
Already up to date.

With junest ns I get

~/.local/share/junest/lib/core/common.sh: line 122: ~/.junest/usr/bin/zgrep: No such file or directory
Unprivileged user namespace disabled. Root permissions are required to enable it: sudo sysctl kernel.unprivileged_userns_clone=1
bwrap: No permissions to creating new namespace, likely because the kernel does not allow non-privileged user namespaces. On e.g. debian this can be enabled with 'sysctl kernel.unprivileged_userns_clone=1'.
Error: Something went wrong while executing bwrap command. Exiting
fsquillace commented 2 years ago

There is definitely something strange in the host machine. Ubuntu 20.04 should have the User NS enabled by default.

fsquillace commented 2 years ago

How come there is not even the file ~/.junest/usr/bin/zgrep: No such file or directory? The image is not installed correctly.

ambientxd commented 2 years ago

I only just found out that there's a workaround for the pacman issue. Edit "RootDir" to full directory of root (example: /home/container/.junest) in /etc/pacman.conf

iboukhss commented 5 months ago

The only way I was able to properly setup junest with proot was to first use pacman -Syy with the default Linux namespaces version. Obviously this is not possible on a host without root access and Linux namespaces :(

fsquillace commented 5 months ago

Please provide more info by following this guide: https://github.com/fsquillace/junest/blob/4d2d0fcb840d9266a39deb0acf2afc44973bf5f3/CONTRIBUTING.md#reporting-bugs