输出指令locale:看到如下提示:
[root@localhost ~]# 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_CN.UTF-8
LC_CTYPE="en_CN.UTF-8"
LC_NUMERIC="en_CN.UTF-8"
LC_TIME="en_CN.UTF-8"
LC_COLLATE="en_CN.UTF-8"
LC_MONETARY="en_CN.UTF-8"
LC_MESSAGES="en_CN.UTF-8"
LC_PAPER="en_CN.UTF-8"
LC_NAME="en_CN.UTF-8"
LC_ADDRESS="en_CN.UTF-8"
LC_TELEPHONE="en_CN.UTF-8"
LC_MEASUREMENT="en_CN.UTF-8"
LC_IDENTIFICATION="en_CN.UTF-8"
LC_ALL=
可以使用loca -a查看当前系统拥有的语言包,上面的提示是因为设置的语言包是系统不存在的,需要安装;
安装指令,如安装英文语言包:
yum install langpacks-en
vim /etc/locale.conf
#将语言包设置为英文
LANG="en_US.UTF-8"
#生效
source /etc/locale.conf
这样上面的提示就消失了!