我偶尔会遇到语言环境错误,并且尝试运行dpkg-reconfigure语言环境来解决此问题。这是输出:
:~$ sudo dpkg-reconfigure locales
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
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
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Generating locales (this might take a while)...
en_US.UTF-8... done
Generation complete.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "C"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "C"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
我寻找了/ usr / bin / locale,但是在我的系统上不存在。我需要创建它吗?我在那放什么?
我也找到一个相关的问题,说他的问题的原因在sshd_config文件中。该文件具有以下条目:
AcceptEnv LANG LC_*
我主要担心这可能会导致我的VPS出现问题,否则,如果不是什么大问题,我将很乐意忽略该问题。我该怎么办?谢谢!
locale-gen fr
将建立所有fr语言环境(fr_BE,fr_CH等)解决了该问题。也许试试看locale-gen en