来自语言环境的 Arch 奇怪错误消息

来自语言环境的 Arch 奇怪错误消息

我有一个运行 Arch 的系统,似乎没问题,但我经常收到类似的消息man: can't set the locale; make sure $LC_* and $LANG are correct

当我跑步时locale我得到以下结果

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_AU.UTF-8
LC_CTYPE="en_AU.UTF-8"
LC_NUMERIC="en_AU.UTF-8"
LC_TIME="en_AU.UTF-8"
LC_COLLATE="en_AU.UTF-8"
LC_MONETARY="en_AU.UTF-8"
LC_MESSAGES="en_AU.UTF-8"
LC_PAPER="en_AU.UTF-8"
LC_NAME="en_AU.UTF-8"
LC_ADDRESS="en_AU.UTF-8"
LC_TELEPHONE="en_AU.UTF-8"
LC_MEASUREMENT="en_AU.UTF-8"
LC_IDENTIFICATION="en_AU.UTF-8"
LC_ALL=

一切看起来都正常,LC_CTYPE等等都已设置


locale-gen似乎没有什么区别并locale -a产生以下结果:-

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
POSIX

显然locale -a不包括我的区域设置,尽管/etc/locale.gen看起来不错并且locale-gen已经运行。我删除了LANG,重新运行,现在就OK了。

答案1

看起来您需要运行locale-gen命令来创建丢失的目录。

https://wiki.archlinux.org/index.php/locale

相关内容