我有一个运行 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
命令来创建丢失的目录。