LoginSignup
3

More than 3 years have passed since last update.

mosh接続するときのERROR解決

Last updated at Posted at 2017-09-29

環境

ローカル

Mac

brew install mobile-shell

remote

Ubuntu

sudo apt-get install mosh

ERROR

接続しようとすると以下のエラーがでていた。

mosh <remote-server>
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 ([no charset variables]) 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=ja_JP.UTF-8
LANGUAGE=
LC_CTYPE=UTF-8
LC_NUMERIC="ja_JP.UTF-8"
LC_TIME="ja_JP.UTF-8"
LC_COLLATE="ja_JP.UTF-8"
LC_MONETARY="ja_JP.UTF-8"
LC_MESSAGES="ja_JP.UTF-8"
LC_PAPER="ja_JP.UTF-8"
LC_NAME="ja_JP.UTF-8"
LC_ADDRESS="ja_JP.UTF-8"
LC_TELEPHONE="ja_JP.UTF-8"
LC_MEASUREMENT="ja_JP.UTF-8"
LC_IDENTIFICATION="ja_JP.UTF-8"
LC_ALL=
Connection to 153.121.58.100 closed.
/usr/local/bin/mosh: Did not find mosh server startup message. (Have you installed mosh on your server?)

参考

解決策

ローカルで、以下を追加。

export LC_CTYPE="ja_JP.UTF-8"

上ので解決しなかった場合

以下のコマンドでローカルとリモートの違いを確認する。

locale

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3