![如何修复 centos 6 中的语言环境问题](https://linux22.com/image/694230/%E5%A6%82%E4%BD%95%E4%BF%AE%E5%A4%8D%20centos%206%20%E4%B8%AD%E7%9A%84%E8%AF%AD%E8%A8%80%E7%8E%AF%E5%A2%83%E9%97%AE%E9%A2%98.png)
我有一台 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"