Mosh 已安装但未显示

Mosh 已安装但未显示

mosh尝试通过.连接到服务器时,会生成以下一系列错误消息。尽管该命令之前已运行并显示 mosh 已安装在服务器上,但事实仍然如此。

sudo apt-get install mosh
[sudo] password for jerdvo:
Reading package lists... Done
Building dependency tree
Reading state information... Done
mosh is already the newest version (1.3.2-2.1build3).
The following package was automatically installed and is no longer required:
  libfwupdplugin1
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 46 not upgraded.

错误如下。除了以下情况外,还有迹象表明存在不适当的区域设置Did not find mosh server startup message

我应该先追哪只兔子以及如何追?

服务器:ubuntu 20.04
本地:OSX 10.13.6

The locale requested by LC_CTYPE=UTF-8 isn't available here.
Running `locale-gen UTF-8' may be necessary.

The locale requested by LC_CTYPE=UTF-8 isn't available here.
Running `locale-gen UTF-8' may be necessary.

mosh-server needs a UTF-8 native locale to run.

Unfortunately, the local environment (LC_CTYPE=UTF-8) specifies
the character set "US-ASCII",

The client-supplied environment (LC_CTYPE=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_ALL to default locale: No such file or directory
LANG=
LANGUAGE=
LC_CTYPE=UTF-8
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
Connection to 159...33 closed.
/usr/local/bin/mosh: Did not find mosh server startup message. (Have you installed mosh on your server?)

我已经尝试过这个,正如评论中所建议的:

locale-gen UTF-8
Error: 'UTF-8' is not a supported language or locale

...我确实觉得很奇怪...

然后跑了

sudo dpkg-reconfigure locales
en_us.UTF-8

sudo update-locale 
LANG=en_US.UTF-8
Error: 'UTF-8' is not a supported language or locale

现在在哪里?

答案1

您可能需要评论SendEnvmacOS 的/etc/ssh/ssh_config.

Host *
    SendEnv LANG LC_*  # comment this line

相关内容