locale报错
linux版本:
redhat enterprise linux AS release 4
用root登录后,输入命令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=AMERICAN_AMERICA.ZHS16GBK
LC_CTYPE="AMERICAN_AMERICA.ZHS16GBK"
LC_NUMERIC="AMERICAN_AMERICA.ZHS16GBK"
LC_TIME="AMERICAN_AMERICA.ZHS16GBK"
LC_COLLATE="AMERICAN_AMERICA.ZHS16GBK"
LC_MONETARY="AMERICAN_AMERICA.ZHS16GBK"
LC_MESSAGES="AMERICAN_AMERICA.ZHS16GBK"
LC_PAPER="AMERICAN_AMERICA.ZHS16GBK"
LC_NAME="AMERICAN_AMERICA.ZHS16GBK"
LC_ADDRESS="AMERICAN_AMERICA.ZHS16GBK"
LC_TELEPHONE="AMERICAN_AMERICA.ZHS16GBK"
LC_MEASUREMENT="AMERICAN_AMERICA.ZHS16GBK"
LC_IDENTIFICATION="AMERICAN_AMERICA.ZHS16GBK"
LC_ALL=AMERICAN_AMERICA.ZHS16GBK
请问前面三个显示的问题如何解决
------解决方案--------------------up
------解决方案--------------------
(从别处抄来的,不知道行不行)
这个问题发生在redhat系统下,归根结底是由于系统缺少相应的glibc包导致的,这个问题就是由于缺少glibc-common导致的,可以查看此时的系统是没有/usr/lib/locale/locale-archive文件的。
根据系统的版本,安装glibc-commo包即可解决问题,我安装的版本是:glibc-common-2.5-12.i386.rpm。
安装完成后,问题解决,locale后,显示正常。
http://www.ixpub.net/redirect.php?tid=933658&goto=lastpost