我正在尝试从我的Gentoo连接到RHEL服务器。两者都已mosh
安装,但是出现此错误:
petanb@localhost ~/Documents $ mosh root@server
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 ([no charset variables]) specifies
the character set "US-ASCII".
LANG=
LC_CTYPE="POSIX"
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 server closed.
/usr/bin/mosh: Did not find mosh server startup message.
在RHEL上,我具有以下语言环境:
# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
我怎样才能解决这个问题?
更新:问题似乎出在Gentoo端,连接到Debian服务器会产生相同的错误,使用其他发行版进行连接。
UPDATE2:我通过添加对其进行了修复
LANG="en_US.UTF-8"
export LANG
进入 ~/.bashrc