mosh 的字符编码/UTF-8 问题

Gue*_*OCs 3 ssh locale

当我在树莓派上安装 mosh 并尝试通过我的计算机连接时,总是出现以下错误:

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?)
Run Code Online (Sandbox Code Playgroud)

我已经尝试过了

以及许多其他解决方案。

我在客户端上使用 Ubuntu 18.04,在服务器上使用 Raspbian。

Pab*_*chi 5

用问题 #916 的技巧解决了这个问题,登录服务器并运行:

sudo dpkg-reconfigure locales
Run Code Online (Sandbox Code Playgroud)

使用与本地计算机相同的区域设置。#793 /应该也有效。

顺便说一句,然后你可以做一些清理工作