# Chroot into /compat/debian fails



## STORP (Feb 17, 2022)

I debootstrap'd bullseye, edited the /etc/fstab file, mount -al'd but it shows this problem:

```
# chroot /compat/debian /bin/bash 
/bin/bash: error while loading shared libraries: libtinfo.so.6: cannot stat shared object: invalid argument 

# chroot /compat/debian /bin/sh 
/bin/sh: error while loading shared libraries: libc.so.6: cannot stat shared object: invalid argument
```
I grep'd /compat/debian/usr/lib for libtinfo and libc but both were not there. I did debootstrap again and it completed with no errors. How do I solve this? 

I am on Feb 10 snapshot of FreeBSD with a completely base install with only debootstrap installed.


----------



## SirDice (Feb 17, 2022)

STORP said:


> am on Feb 10 snapshot of FreeBSD


So that's 12-STABLE, 13-STABLE or 14-CURRENT. Which one is it? Both -STABLE and -CURRENT are _development_ versions, and -CURRENT is an _unsupported_ development version.

You are likely misunderstanding how the FreeBSD versioning system works. I suggest you start with a -RELEASE version and get some experience with that first.


----------



## monwarez (Feb 17, 2022)

Note that only RELEASE are really supported here, (you may get away with stable). Since I don't know which version of FreeBSD you are using, I will assume that you use 13.0-RELEASE

Does the following command: `sysctl compat.linux.emul_path` output what you want (i.e /compat/debian) or it output the default:
/compat/linux

If it is the latter, you should do as root
`sysctl compat.linux.emul_path=/compat/debian`


----------



## STORP (Feb 17, 2022)

SirDice said:


> So that's 12-STABLE, 13-STABLE or 14-CURRENT. Which one is it? Both -STABLE and -CURRENT are _development_ versions, and -CURRENT is an _unsupported_ development version.
> 
> You are likely misunderstanding how the FreeBSD versioning system works. I suggest you start with a -RELEASE version and get some experience with that first.


Oh yeah forgot to mention 13-STABLE


----------



## STORP (Feb 17, 2022)

Did not work but it was set to /compat/linux which I set to the other dir as you said


monwarez said:


> Note that only RELEASE are really supported here, (you may get away with stable). Since I don't know which version of FreeBSD you are using, I will assume that you use 13.0-RELEASE
> 
> Does the following command: `sysctl compat.linux.emul_path` output what you want (i.e /compat/debian) or it output the default:
> /compat/linux
> ...


----------



## monwarez (Feb 17, 2022)

With 13.0-Release by following 








						[Linuxulator] How to install Brave (Linux app) on FreeBSD 13.0+
					

Important notes: 1) This guide is for FreeBSD 13.0 and newer only!! For FreeBSD 12, please see: https://forums.freebsd.org/threads/linuxulator-how-to-run-google-chrome-linux-binary-on-freebsd.77559/ 2) This method should be valid for installing any other Chromium-based web browser (Google...




					forums.freebsd.org
				




and replacing focal with bullseye after the first chroot I cannot reproduce this error.

But with an old ubuntu that I tried to upgrade it failed at some point, and then I get this kind of error when trying to update with apt.


----------

