I have created a chroot jail and when I log in I get a bash warning bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
I tried to google the error, but wasn't able to find a solution
I have created a chroot jail and when I log in I get a bash warning bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
I tried to google the error, but wasn't able to find a solution
Sounds like you're missing /usr/lib/locale
inside your chroot. Try copying them into place from your non-chroot'd /usr/lib/locale
or chroot with LANG=C
.
While Travis Campbell's answer is certainly very valid, I found an alternative solution on my Debian Buster chroot that probably also works on Ubuntu. In the chrooted environment:
apt update
apt install locales
dpkg-reconfigure locales
I then selected the locale that the error message complained about (en_US.UTF-8
).
Exiting and going back to the chrooted environment doesn't display the error message anymore.