[求助]有关locale出错的问题

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
头像
cvwolf
帖子: 32
注册时间: 2008-03-09 0:17
联系:

[求助]有关locale出错的问题

#1

帖子 cvwolf » 2009-01-09 15:30

最近乱鼓捣系统,想在终端tty下显示中文来着,结果出现一下错误:

输入

代码: 全选

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=zh.CN.UTF8
LC_CTYPE="zh.CN.UTF8"
LC_NUMERIC="zh.CN.UTF8"
LC_TIME="zh.CN.UTF8"
LC_COLLATE="zh.CN.UTF8"
LC_MONETARY="zh.CN.UTF8"
LC_MESSAGES="zh.CN.UTF8"
LC_PAPER="zh.CN.UTF8"
LC_NAME="zh.CN.UTF8"
LC_ADDRESS="zh.CN.UTF8"
LC_TELEPHONE="zh.CN.UTF8"
LC_MEASUREMENT="zh.CN.UTF8"
LC_IDENTIFICATION="zh.CN.UTF8"
LC_ALL=
用apt-get安装删除软件时出现以下错误:

代码: 全选

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LANG = "zh.CN.UTF8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
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
Selecting previously deselected package amule-daemon.
(Reading database ... 128088 files and directories currently installed.)
Unpacking amule-daemon (from .../amule-daemon_2.2.2-1ubuntu1_i386.deb) ...
Processing triggers for man-db ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LANG = "zh.CN.UTF8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
/usr/bin/mandb: can't set the locale; make sure $LC_* and $LANG are correct
manconv: can't set the locale; make sure $LC_* and $LANG are correct
manconv: can't set the locale; make sure $LC_* and $LANG are correct
manconv: can't set the locale; make sure $LC_* and $LANG are correct
manconv: can't set the locale; make sure $LC_* and $LANG are correct
manconv: can't set the locale; make sure $LC_* and $LANG are correct
manconv: can't set the locale; make sure $LC_* and $LANG are correct
manconv: can't set the locale; make sure $LC_* and $LANG are correct
Setting up amule-daemon (2.2.2-1ubuntu1) ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LANG = "zh.CN.UTF8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
 * Not starting aMule daemon, AMULED_USER not set in /etc/default/amule-daemon.
鄙人新手,恳请赐教。
头像
ranfow
帖子: 176
注册时间: 2006-07-10 16:38
联系:

Re: [求助]有关locale出错的问题

#2

帖子 ranfow » 2009-01-09 16:27

应该是locale设置问题。似乎是你已经破坏了你的locale设置文件 :em01
头像
HuntXu
帖子: 5776
注册时间: 2007-09-29 3:09

Re: [求助]有关locale出错的问题

#3

帖子 HuntXu » 2009-01-09 16:32

locale -a看看
HUNT Unfortunately No Talent...
头像
cvwolf
帖子: 32
注册时间: 2008-03-09 0:17
联系:

Re: [求助]有关locale出错的问题

#4

帖子 cvwolf » 2009-01-11 22:48

locale -a 出现一下信息:

代码: 全选

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_COLLATE to default locale: No such file or directory
C
POSIX
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_NG
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZW.utf8
zh_CN
zh_CN.gb18030
zh_CN.gbk
zh_CN.utf8
zh_HK
zh_HK.utf8
zh_SG.utf8
zh_TW
zh_TW.utf8
头像
cvwolf
帖子: 32
注册时间: 2008-03-09 0:17
联系:

Re: [求助]有关locale出错的问题

#5

帖子 cvwolf » 2009-01-11 22:51

好象是 locale 出现的是 zh.CN
而 locale -a 出现的是zh_CN

和这有关?
我的另一台电脑上locale 出现的是 zh_CN

如何改过来??
头像
cvwolf
帖子: 32
注册时间: 2008-03-09 0:17
联系:

Re: [求助]有关locale出错的问题

#6

帖子 cvwolf » 2009-01-11 23:06

:em06 新发现,执行 man 命令时出现

代码: 全选

man: can't set the locale; make sure $LC_* and $LANG are correct
头像
cvwolf
帖子: 32
注册时间: 2008-03-09 0:17
联系:

Re: [求助]有关locale出错的问题

#7

帖子 cvwolf » 2009-01-12 16:43

我重装了系统 :em20
头像
HuntXu
帖子: 5776
注册时间: 2007-09-29 3:09

Re: [求助]有关locale出错的问题

#8

帖子 HuntXu » 2009-01-12 17:51

应该是
zh_CN.utf8或者zh_CN.UTF-8...
HUNT Unfortunately No Talent...
回复