You are not logged in.

#1 2010-05-19 17:09:40

zqyking
Member
From: HongKong
Registered: 2010-05-19
Posts: 29

About locale problem Plz help me

erro.png

Who knows how solve this problem?
which file to edit can solve??

Help~~

thanks...........

Last edited by zqyking (2010-05-19 17:11:31)

Offline

#2 2010-05-19 17:12:26

zqyking
Member
From: HongKong
Registered: 2010-05-19
Posts: 29

Re: About locale problem Plz help me

[root@maschine ~]# perl
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "",
        LC_ALL = (unset),
        LANG = "zh_HK.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

Offline

#3 2010-05-19 17:19:41

kazuo
Member
From: São Paulo/Brazil
Registered: 2008-03-18
Posts: 413
Website

Re: About locale problem Plz help me

You generated the zh_HK.UTF-8 locale? Look at /etc/locale.gen for it, uncomment and run locale-gen as root.

Offline

#4 2010-05-19 17:35:04

zqyking
Member
From: HongKong
Registered: 2010-05-19
Posts: 29

Re: About locale problem Plz help me

kazuo wrote:

You generated the zh_HK.UTF-8 locale? Look at /etc/locale.gen for it, uncomment and run locale-gen as root.

it' s not this file problem...

my /etc/rc.conf file & /etc/loacle.gen file also en_US.UTF-8

Last edited by zqyking (2010-05-19 17:36:04)

Offline

#5 2010-05-19 17:41:36

zqyking
Member
From: HongKong
Registered: 2010-05-19
Posts: 29

Re: About locale problem Plz help me

look at this .

[root@maschine ~]# emacs /etc/locale.gen

(process:2722): Gtk-WARNING **: Locale not supported by C library.
        Using the fallback 'C' locale.

and also look this

[root@maschine ~]# 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_US.utf8


I think the problem is about that 'C', but i don't know which file is have that.

Offline

#6 2010-05-19 17:43:28

kazuo
Member
From: São Paulo/Brazil
Registered: 2008-03-18
Posts: 413
Website

Re: About locale problem Plz help me

So if you are using en_US.UTF-8 locale from where the zh_HK.UTF-8 is set?
please post the output of

$ locale
$ grep 'LOCALE' /etc/rc.conf

Last edited by kazuo (2010-05-19 17:44:53)

Offline

#7 2010-05-19 17:47:42

zqyking
Member
From: HongKong
Registered: 2010-05-19
Posts: 29

Re: About locale problem Plz help me

[root@maschine ~]# 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_HK.UTF-8
LC_CTYPE="zh_HK.UTF-8"
LC_NUMERIC="zh_HK.UTF-8"
LC_TIME="zh_HK.UTF-8"
LC_COLLATE="zh_HK.UTF-8"
LC_MONETARY="zh_HK.UTF-8"
LC_MESSAGES="zh_HK.UTF-8"
LC_PAPER="zh_HK.UTF-8"
LC_NAME="zh_HK.UTF-8"
LC_ADDRESS="zh_HK.UTF-8"
LC_TELEPHONE="zh_HK.UTF-8"
LC_MEASUREMENT="zh_HK.UTF-8"
LC_IDENTIFICATION="zh_HK.UTF-8"
LC_ALL=
[root@maschine ~]# grep 'LOCALE' /etc/rc.conf
# LOCALE: available languages can be listed with the 'locale -a' command
LOCALE="en_US.UTF-8"

the locale -a at Previous reply

Offline

#8 2010-05-19 17:50:41

kazuo
Member
From: São Paulo/Brazil
Registered: 2008-03-18
Posts: 413
Website

Re: About locale problem Plz help me

Something are setting zh_HK.UTF-8, look at you env (.bashrc for example) and change it. I'm assuming that you want an en_US environment and not a zh_HK.UTF-8 (as you recused my previous solution about locale-gen)

EDIT: To you dont be lost, the problem is you system is asking for zh_HK locale, but you dont generated this locale so things is falling (and you dont what to generate it as you previous sugested)

Last edited by kazuo (2010-05-19 17:53:12)

Offline

#9 2010-05-19 17:58:12

zqyking
Member
From: HongKong
Registered: 2010-05-19
Posts: 29

Re: About locale problem Plz help me

at my home irectory not have .bashrc when installed system. It was a strange question.
this is /etc/bash.bashrc

PS1='[\u@\h \W]\$ '
PS2='> '
PS3='> '
PS4='+ '

export PS1 PS2 PS3 PS4

if test "$TERM" = "xterm" -o \
        "$TERM" = "xterm-color" -o \
        "$TERM" = "xterm-256color" -o \
        "$TERM" = "rxvt" -o \
        "$TERM" = "rxvt-unicode" -o \
        "$TERM" = "xterm-xfree86"; then
    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
    export PROMPT_COMMAND
fi

[ -r /etc/bash_completion   ] && . /etc/bash_completion
[ -r /etc/bash.bashrc.local ] && . /etc/bash.bashrc.local

Offline

#10 2010-05-19 18:04:22

kazuo
Member
From: São Paulo/Brazil
Registered: 2008-03-18
Posts: 413
Website

Re: About locale problem Plz help me

Uhh. ok really you or someone typed the zh_HK.UTF-8 somewhere.

First when I said env I expect that you correct it to you env (I give .bashrc only as a example)

Look for the other env files. (And in the correct places, all the output you give me is from a root session so search for it in the root home dir)

You can start you shell with --verbose option (bash -v or zsh -v for *example*) to see if you find the source of it

Last edited by kazuo (2010-05-19 18:05:59)

Offline

#11 2010-05-19 18:11:33

zqyking
Member
From: HongKong
Registered: 2010-05-19
Posts: 29

Re: About locale problem Plz help me

the root home dir is:

[root@maschine ~]# ls -al
total 784
drwxr-x--- 20 root root   4096 May 20 02:02 .
drwxr-xr-x 21 root root   4096 May 19 04:15 ..
-rw-------  1 root root    151 May 20 00:32 .Xauthority
drwx------  3 root root   4096 May 19 15:44 .adobe
-rw-------  1 root root   5198 May 20 01:45 .bash_history
drwxr-xr-x  3 root root   4096 May 19 15:22 .cache
drwxr-xr-x  6 root root   4096 May 19 20:09 .config
drwx------  3 root root   4096 May 19 14:35 .dbus
-rw-------  1 root root     26 May 19 14:35 .dmrc
drwxr-xr-x  3 root root   4096 May 19 14:04 .emacs.d
drwx------  3 root root   4096 May 20 00:32 .gconf
drwx------  2 root root   4096 May 20 01:44 .gconfd
drwx------  3 root root   4096 May 19 20:54 .gftp
drwx------  3 root root   4096 May 19 14:35 .gnupg
drwxr-xr-x  2 root root   4096 May 19 14:35 .gstreamer-0.10
drwx------  6 root root   4096 May 19 14:46 .kde4
drwxr-xr-x  3 root root   4096 May 19 14:35 .local
drwx------  3 root root   4096 May 19 15:44 .macromedia
drwx------  4 root root   4096 May 19 15:24 .mozilla
drwxr-xr-x  2 root root   4096 May 19 20:09 .mplayer
drwx------  4 root root   4096 May 19 21:08 .thumbnails
-rw-------  1 root root 602382 May 20 02:08 .xsession-errors
drwxr-xr-x  2 root root   4096 May 19 15:25 Desktop
drwxr-xr-x  2 root root   4096 May 19 17:52 down
-rw-r--r--  1 root root  42136 May 20 00:44 erro.png
-rwxr-xr-x  1 root root   7288 May 19 16:41 name
-rw-r--r--  1 root root    435 May 19 16:40 name.c
-rw-r--r--  1 root root     66 May 19 16:33 name.pl
-rw-r--r--  1 root root     66 May 19 16:31 name.py

and flow the bash --verbose:

[root@maschine ~]# bash --verbose
#
# /etc/bash.bashrc
#
# This file is the systemwide bashrc file. While most of the
# environment is preserved when running an interactive shell
# the PS[1-4] variables, aliases and functions are reset.
#
# When running a non-login shell, apply the following settings:
# - Prompt defaults (PS[1-4], PROMPT_COMMAND)
# - bash_completion if it exists
# - source /etc/bash.bashrc.local

PS1='[\u@\h \W]\$ '
PS2='> '
PS3='> '
PS4='+ '

export PS1 PS2 PS3 PS4

if test "$TERM" = "xterm" -o \
        "$TERM" = "xterm-color" -o \
        "$TERM" = "xterm-256color" -o \
        "$TERM" = "rxvt" -o \
        "$TERM" = "rxvt-unicode" -o \
        "$TERM" = "xterm-xfree86"; then
    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
    export PROMPT_COMMAND
fi

[ -r /etc/bash_completion   ] && . /etc/bash_completion
[ -r /etc/bash.bashrc.local ] && . /etc/bash.bashrc.local
echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"

is also /etc/bash.bashrc

Offline

#12 2010-05-20 06:27:36

zqyking
Member
From: HongKong
Registered: 2010-05-19
Posts: 29

Re: About locale problem Plz help me


All is done........ Be OK.............
big_smile

[root@maschine ~]# perl -v

This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi

Copyright 1987-2009, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

Last edited by zqyking (2010-05-20 06:28:40)

Offline

Board footer

Powered by FluxBB