错误信息:
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
使用locale 查看:
[root@ local~]# localelocale: Cannot set LC_CTYPE to default locale: No such file or directorylocale: Cannot set LC_MESSAGES to default locale: No such file or directorylocale: Cannot set LC_ALL to default locale: No such file or directoryLANG=en_US.utf8LC_CTYPE="zh_CN.GB18030"LC_NUMERIC="zh_CN.GB18030"LC_TIME="zh_CN.GB18030"LC_COLLATE="zh_CN.GB18030"LC_MONETARY="zh_CN.GB18030"LC_MESSAGES="zh_CN.GB18030"LC_PAPER="zh_CN.GB18030"LC_NAME="zh_CN.GB18030"LC_ADDRESS="zh_CN.GB18030"LC_TELEPHONE="zh_CN.GB18030"LC_MEASUREMENT="zh_CN.GB18030"LC_IDENTIFICATION="zh_CN.GB18030"LC_ALL=zh_CN.GB18030
修改:
vim /etc/sysconfig/i18n #将以下信息修改成自己系统语言,这里以en_US.UTF-8为例说明
使用命令重新生成下字体:LANG="en_US.UTF-8"
#SYSFONT="latarcyrheb-sun16"#LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN"LANGUAGE="en_US.UTF-8:zh_CN.GB2312:zh_CN"SUPPORTED="zh_CN.GB18030:zh_CN:zh:en_US.UTF-8:en_US:en"SYSFONT="lat0-sun16"#export LC_ALL="zh_CN.GB18030"export LC_ALL="en_US.UTF-8"
localedef -v -c -i en_US -f UTF-8 en_US.UTF-8
localedef -i en_US -f ISO-8859-1 -A /usr/share/locale/locale.alias en_US
localedef -i zh_CN -f GB2312 -A /usr/share/locale/locale.alias zh_CN
重新登陆测试。