LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   perl: warning: Falling back to the standard locale ("C"). (http://www.linuxquestions.org/questions/debian-26/perl-warning-falling-back-to-the-standard-locale-c-208709/)

walterbyrd 07-23-2004 10:32 AM

perl: warning: Falling back to the standard locale ("C").
 
I'm getting a this everytime a do an apt-get install. The installs seem to work, but I'm flooded with error messages.

mritch 07-23-2004 05:44 PM

that's a problem with the locales setting on your system (harmless;-).
type "env" to see your environment.

try
"export LANGUAGE=your_language"
(do the same for LG_ALL & LANG) where your_language is for example "de_AT@euro" or "en_US" and see if everthing right now.

to make it permanent put those settings in your .bashrc or globally ex. /etc/profile:

LG_ALL=de_AT@euro
export LG_ALL

sl mritch.

macondo 07-23-2004 06:29 PM

mritch is correct.

you can also do it by:

#dpkg-reconfigure locales

choose your locale(s)

for example i choose all the en_US and the es_ES utf-8

in the next screen choose the one you want for your 'environment'
wait for to generate the locales and voilá

Dead Parrot 07-23-2004 07:30 PM

"env" is a nice command to view environment settings, but it only shows the LANG locale. To get a full view of the current locale environment you can use "locale" command.

There's also a program called "localeconf", which I haven't tried myself, so I don't know if it has any advantage over the usual "dpkg-reconfigure locales" (which works beautifully in my Debian box).

walterbyrd 07-23-2004 11:02 PM

Thank for the replies. The dpkg-reconfigure locals didn't really work for me.
-------------------------------------
dpkg-reconfigure locals
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "en_US.UTF-8",
LANG = (unset)
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_ALL to default locale: No such file or directory
Package `locals' is not installed and no info is available.
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
/usr/sbin/dpkg-reconfigure: locals is not installed
---------------------------------------------

cammoblammo 09-10-2004 08:17 AM

walterbyrd,

This is probably a bit old now, but I think I can see your problem. You typed

dpkg-reconfigure locals

when you needed to type

dpkg-reconfigure locales

That 'e' seems to be the source of your trouble...!

Darek84CJ 01-25-2006 05:28 PM

Here is my experience

I read on a few threads to install and reconfigure 'locales'
When I tried apt-get install locales, it gave me some dependency issue. When I googled it, I guess it was a known bug. ???

Anyways, I worked around it and installed localeconf. I had to answer alot of questions, but kept sticking with en_US ECF 8 or something like that

bluej100 01-18-2007 04:03 PM

dpkg-reconfigure worked great for me. Thanks, everyone.

atul_mehrotra 02-22-2007 05:52 AM

I also faced same problems...

But it finally got solved using thsi command.

sudo aptitude install locales

-cheers

satimis 10-02-2007 07:38 AM

Hi folks,


Ubuntu 7.04 server amd64 Host OS
vmware-mui-distrib-1.0.4-56528
vmware-server-distrib-1.0.4-56528


I have been suffering on similar problem, having googling around for 2 days without a solution.


1)
1st problem - on ssh

On an Ubuntu 7.04 desktop running

$ ssh -Y user@server_router_ip rox
password:
Code:


(process:5576): Gdk-WARNING **: locale not supported by C library

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

Remark: rox - a light-weight file manager


$ ssh user@server_router_ip
$ ls
displaying files and directories of the server which indicates server connnected.


On the other way:

On server
$ ssh -Y user@desktop_router_ip rox
it connected with the rox displayed locally.



2)
2nd problem - on VMWare

$ sudo /etc/init.d/httpd.vmware start
Code:

Starting httpd.vmware:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "en_HK.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").


Please advise how to fix the problem. TIA.


Remark:
Previously I also suffered on locale problem on this box. I tried to fix it with a new installation of locale resulting in the server crashed. This is a fresh installation, NOT completed yet.


Edit:

$ locale
Code:

LANG=en_HK.UTF-8
LC_CTYPE="en_HK.UTF-8"
LC_NUMERIC="en_HK.UTF-8"
LC_TIME="en_HK.UTF-8"
LC_COLLATE="en_HK.UTF-8"
LC_MONETARY="en_HK.UTF-8"
LC_MESSAGES="en_HK.UTF-8"
LC_PAPER="en_HK.UTF-8"
LC_NAME="en_HK.UTF-8"
LC_ADDRESS="en_HK.UTF-8"
LC_TELEPHONE="en_HK.UTF-8"
LC_MEASUREMENT="en_HK.UTF-8"
LC_IDENTIFICATION="en_HK.UTF-8"
LC_ALL=

$ locale -a
Code:

C
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZW.utf8
POSIX

$ apt-cache policy language-pack-en
Code:

language-pack-en:
  Installed: 1:7.04+20070601
  Candidate: 1:7.04+20070601
  Version table:
 *** 1:7.04+20070601 0
        500 http://us.archive.ubuntu.com feisty-updates/main Packages
        100 /var/lib/dpkg/status
    1:7.04+20070412 0
        500 http://us.archive.ubuntu.com feisty/main Packages

B.R.
satimis

jamie.krug 05-14-2009 09:44 AM

Ubuntu VM on Xen FIX
 
I had a similar problem and the solution that worked for me does not appear to be in this thread, so here you go...

I've had my hosting company setup a couple VPS servers for me, running Ubuntu 8.04 Server 64-bit. Each time I noticed these errors whenever I ran apt-get upgrade:

Code:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "en_US.UTF-8"
    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

...and here is the output from the locale command:

Code:

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.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

I know they're running my VMs on Xen, so I found my solution on the Ubuntu Community page for Xen (https://help.ubuntu.com/community/Xen). The doc states that:

Quote:

Debootstrap does not create locales. When you run the virtual machine, if you get errors like the following, run the command below.
...
To fix this, run this, replace en_US.UTF-8 with your own locale.
Code:

sudo locale-gen en_US.UTF-8
That one command did the trick for me. My output from the locale command is then:

Code:

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Hope that helps someone else!

Best,
Jamie

AlucardZero 05-14-2009 09:50 AM

I would guess that dpkg-reconfigure locales would do that if you selected en_US.utf8, but that way is good to know too.


All times are GMT -5. The time now is 10:54 AM.