Posted at

mosh接続するときのERROR解決

More than 1 year has passed since last update.


環境


ローカル

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?)

```


参考

http://yuzuemon.hatenablog.com/entry/2013/10/11/025628


解決策

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

export LC_CTYPE="ja_JP.UTF-8"


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

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

locale