某些东西弄乱了我的语言环境设置,我无法确定发生这种情况的位置和原因。我使用的是Manjaro系统,但几天前通过双启动选项安装了Ubuntu。问题开始了。
/ etc / locale.gen
...
#en_BW ISO-8859-1
#en_CA.UTF-8 UTF-8
#en_CA ISO-8859-1
en_DK.UTF-8 UTF-8
#en_DK ISO-8859-1
#en_GB.UTF-8 UTF-8
...
sudo locale-gen被称为
/ etc / default / locale
LANG=en_DK.utf8
LC_CTYPE="en_DK.utf8"
LC_NUMERIC=en_DK.UTF-8
LC_TIME=en_DK.UTF-8
LC_COLLATE="en_DK.utf8"
LC_MONETARY=en_DK.UTF-8
LC_MESSAGES="en_DK.utf8"
LC_PAPER=en_DK.UTF-8
LC_NAME=en_DK.UTF-8
LC_ADDRESS=en_DK.UTF-8
LC_TELEPHONE=en_DK.UTF-8
LC_MEASUREMENT=en_DK.UTF-8
LC_IDENTIFICATION=en_DK.UTF-8
LC_ALL=
/ etc / locale.conf
LANG=en_DK.UTF-8
manjaro-settings-manager:
everything set to en_DK.UTF-8
bashrc,zshrc,〜/ .profile中没有进一步的导出
输出语言环境:
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_DK.UTF-8
LC_CTYPE="en_DK.UTF-8"
LC_NUMERIC=en_GB.UTF-8
LC_TIME=en_GB.UTF-8
LC_COLLATE="en_DK.UTF-8"
LC_MONETARY=en_GB.UTF-8
LC_MESSAGES="en_DK.UTF-8"
LC_PAPER=en_GB.UTF-8
LC_NAME=en_GB.UTF-8
LC_ADDRESS=en_GB.UTF-8
LC_TELEPHONE=en_GB.UTF-8
LC_MEASUREMENT=en_GB.UTF-8
LC_IDENTIFICATION=en_GB.UTF-8
LC_ALL=
使用]解决了>
grep -rnw '.' -e 'en_GB.UTF-8'
找出Ubuntu在〜/ .pam_environment中设置语言环境,以某种方式覆盖了系统默认值。替换完这些之后,一切都很好。
也许这可以为某人省些麻烦。