Gentoo + debootstrap error when used with fakeroot and fakechroot

I use the Gentoo field and I want to create Debian based chroot environments without using root or sudo account .

This seems possible with tools like fakeroot and fakechroot , but so far I have not had any success with them. Here is the command I use for Precise:

fakeroot fakechroot /usr/sbin/debootstrap --variant=fakechroot precise ./precise http://archive.ubuntu.com/ubuntu/ 

It always fails with the same error:

 I: Installing core packages... W: Failure trying to run: chroot precise dpkg --force-depends --install /var/cache/apt/archives/base-passwd_3.5.24_amd64.deb W: See precise/debootstrap/debootstrap.log for details 

And the contents of debootstrap.log :

 dpkg: error while loading shared libraries: libselinux.so.1: cannot open shared object file: No such file or directory 

I have no idea why SELinux is used and why it does not handle this dependency correctly. In addition, I tried to build Wise and Jesse. The same mistake.

What's happening? Versions:

Debootstrap-1.0.67

fakeroot-1.19

fakechroot-2.17.2

core-3.19.6

+6
source share
1 answer

fakeroot and fakechroot are not a problem here. It looks like libselinux.so.1 was used when dpkg was originally built. First try running the locate command:

 locate libselinux 

no version. This should 1) confirm that it does not exist, or 2) that it exists, but not in your LD_LIBRARY_PATH path or the default library path.

If locate displays a different version, use the ln -s command to create a symbolic link (libselinux.so.1) that points to the existing version.

To see the dependency, run:

 ldd `which dpkg` 
+1
source

Source: https://habr.com/ru/post/986939/


All Articles