Fix Linux LC_CTYPE Problem

Menu:

Problem

在远程ssh访问,远程主机和本机语言环境不同会出现此问题。

like this:

1
2
3
4
#like
LC_ALL = (unset),LANGUAGE = (unset),
#like
locale: Cannot set LC_CTYPE to default locale: No such file or directory

Solve

install locales-all (recommend)

1
sudo apt install locales-all

or like this (temporarily)

1
2
export LC_ALL=C
export LC_CTYPE=en_US.UTF-8
------ 文章已经结束,谢谢你的阅读 ------
------ article has ended,thank you for reading ------