首页 > 系统 > linux > 正文

centos登陆后提示 locale: Cannot set LC_CTYPE to default locale: No such fil
2017-09-06 10:29:29 点击:

错误信息:locale: Cannot set LC_CTYPE to default locale: No such file or directorylocale: Cannot set LC_MESSAGES to

错误信息:

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~]# 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="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




重新登陆测试。


相关热词搜索:centos登陆后提示

上一篇:linux系统同步时间工具rdate
下一篇:svn: Item is not readable