Perl Locale警告Debian

jim*_*mbo 16 perl debian warnings locale

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_CA.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Run Code Online (Sandbox Code Playgroud)

我一直收到这条消息.我在VPS上运行Debian.我尝试过通过谷歌找到的众多解决方案,没有人帮助过.我该怎么办?

Dar*_*rme 42

尝试直接以这种方式设置语言环境,它在Ubuntu 10.04上适用于我,只需根据您的需要定制语言环境:

root@hostname:~# export LANGUAGE=en_US.UTF-8
root@hostname:~# export LANG=en_US.UTF-8
root@hostname:~# export LC_ALL=en_US.UTF-8
root@hostname:~# locale-gen en_US.UTF-8
Run Code Online (Sandbox Code Playgroud)

然后:

root@hostname:~# dpkg-reconfigure locales
Run Code Online (Sandbox Code Playgroud)

希望这可以帮助!