如何修复 centos 6 中的语言环境问题

如何修复 centos 6 中的语言环境问题

我有一台 centos 6 服务器,遇到了一些语言环境问题。当我输入命令时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_US.utf8
LC_CTYPE=en_US.utf8
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=

我的环境文件中有以下内容:

$ more /etc/environment
LANG=en_US.utf8
LC_CTYPE=en_US.utf8

/etc/locale.conf 还有以下内容:

$ more /etc/locale.conf
LANG=en_US.UTF8

为什么它仍然在说:

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

答案1

编辑/etc/sysconfig/i18n

我在文件中有以下内容:

LANG="en_US.UTF-8"
SYSFONT="latarcyrheb-sun16"

相关内容