Always, when I install mosh on a raspberry pi and try to connect through my computer, I get the following error:
lz@blade:~$ mosh -ssh="ssh -p 2323" pi@192.168.0.3
pi@192.168.0.3's password:
The locale requested by LC_CTYPE=pt_BR.UTF-8 isn't available here.
Running `locale-gen pt_BR.UTF-8' may be necessary.
The locale requested by LC_CTYPE=pt_BR.UTF-8 isn't available here.
Running `locale-gen pt_BR.UTF-8' may be necessary.
mosh-server needs a UTF-8 native locale to run.
Unfortunately, the local environment (LC_CTYPE=pt_BR.UTF-8) specifies
the character set "US-ASCII",
The client-supplied environment (LC_CTYPE=pt_BR.UTF-8) specifies
the character set "US-ASCII".
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE=pt_BR.UTF-8
LC_NUMERIC=pt_BR.UTF-8
LC_TIME=pt_BR.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=pt_BR.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=pt_BR.UTF-8
LC_NAME=pt_BR.UTF-8
LC_ADDRESS=pt_BR.UTF-8
LC_TELEPHONE=pt_BR.UTF-8
LC_MEASUREMENT=pt_BR.UTF-8
LC_IDENTIFICATION=pt_BR.UTF-8
LC_ALL=
Connection to 192.168.0.3 closed.
/usr/bin/mosh: Did not find mosh server startup message. (Have you installed mosh on your server?)
I already tried
- https://unix.stackexchange.com/questions/280796/mosh-server-needs-a-utf-8-native-locale-to-run
- https://github.com/mobile-shell/mosh/issues/793
- https://github.com/mobile-shell/mosh/issues/916
and many other solutions.
I'm using Ubuntu 18.04 on the client and Raspbian on the server.
localedef -i pt_BR -c -f UTF-8 -A /usr/share/locale/locale.alias pt_BR.UTF-8
on your server ( 192.168.0.3 ) asroot
or prepend that withsudo
. – Thomas Oct 06 '18 at 13:49/etc/locale.gen
is available, open that with a text editor as root and uncomment thept_BR.UTF-8
line. After that runlocale-gen
, which should run the command above and should be the preferred way. – Thomas Oct 06 '18 at 14:03