OpenVZ Forum


Home » Mailing lists » Users » perl LOCALE issue- and solution
perl LOCALE issue- and solution [message #24683] Fri, 07 December 2007 18:15 Go to next message
Michael Klatsky is currently offline  Michael Klatsky
Messages: 3
Registered: December 2007
Junior Member
Hello all-

I ran into a puzzling issue and found a solution- but I am wondering
what the root cause really was, and whether others have run into this:

After create a VE using the repo provided centos-4-i386-default
template, I entered the VE via ssh. When running perl (any perl
script), I got the message:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_US:en",
        LC_ALL = (unset),
        LANG = "en_US"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C")

After doing a bit of hunting on methods to set this, including these pages:
http://www.in-ulm.de/~mascheck/locale/#short
http://perldoc.perl.org/perllocale.html#Permanently-fixing-your-system's-locale-configuration

I started looking closely at glibc-common, as when I did "locale -a" I
got the message that locale directories could not be found.

I checked, and indeed- rpm -q glibc-common reported that the package
was installed. However, after checking some of the files included that
should have existed, I found that the local dirs were not there
(example: /usr/lib/locale/en_US/LC_TIME). So, I grabbed the
glibc-common rpm and did a rpm -ivh --force,  and voila- all was
properly installed.

The purpose of my post is to document this for others who may have run
into this, and t solicit any theories as to why that package was
"phantomly" installed. Significantly, other than the locale issue- the
system was operating properly.

Thanks- and so far quite impressed


-- 


Sincerely,

Michael
Re: perl LOCALE issue- and solution [message #24778 is a reply to message #24683] Mon, 10 December 2007 11:55 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

was it -minimal template?
Some of templates AFAIK have removed locales,
since locales take really much space (~20Mb) while not needed in most cases
(except for the default C one).

Thanks,
Kirill


Michael Klatsky wrote:
> Hello all-
> 
> I ran into a puzzling issue and found a solution- but I am wondering
> what the root cause really was, and whether others have run into this:
> 
> After create a VE using the repo provided centos-4-i386-default
> template, I entered the VE via ssh. When running perl (any perl
> script), I got the message:
> 
> perl: warning: Setting locale failed.
> perl: warning: Please check that your locale settings:
>         LANGUAGE = "en_US:en",
>         LC_ALL = (unset),
>         LANG = "en_US"
>     are supported and installed on your system.
> perl: warning: Falling back to the standard locale ("C")
> 
> After doing a bit of hunting on methods to set this, including these pages:
> http://www.in-ulm.de/~mascheck/locale/#short
> http://perldoc.perl.org/perllocale.html#Permanently-fixing-your-system's-locale-configuration
> 
> I started looking closely at glibc-common, as when I did "locale -a" I
> got the message that locale directories could not be found.
> 
> I checked, and indeed- rpm -q glibc-common reported that the package
> was installed. However, after checking some of the files included that
> should have existed, I found that the local dirs were not there
> (example: /usr/lib/locale/en_US/LC_TIME). So, I grabbed the
> glibc-common rpm and did a rpm -ivh --force,  and voila- all was
> properly installed.
> 
> The purpose of my post is to document this for others who may have run
> into this, and t solicit any theories as to why that package was
> "phantomly" installed. Significantly, other than the locale issue- the
> system was operating properly.
> 
> Thanks- and so far quite impressed
> 
>
Re: perl LOCALE issue- and solution [message #24781 is a reply to message #24778] Mon, 10 December 2007 12:30 Go to previous messageGo to next message
Thorsten Schifferdeck is currently offline  Thorsten Schifferdeck
Messages: 38
Registered: February 2006
Member
Hi,

or Disable overideing LC_* variables in /etc/ssh/sshd_config:

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

to
#AcceptEnv LANG LC_*

so default LC ist used.

Regards,
 Thorsten

Am Mo, 10.12.2007, 12:55, schrieb Kirill Korotaev:
> was it -minimal template?
> Some of templates AFAIK have removed locales,
> since locales take really much space (~20Mb) while not needed in most
> cases
> (except for the default C one).
>
> Thanks,
> Kirill
>
>
> Michael Klatsky wrote:
>> Hello all-
>>
>> I ran into a puzzling issue and found a solution- but I am wondering
>> what the root cause really was, and whether others have run into this:
>>
>> After create a VE using the repo provided centos-4-i386-default
>> template, I entered the VE via ssh. When running perl (any perl
>> script), I got the message:
>>
>> perl: warning: Setting locale failed.
>> perl: warning: Please check that your locale settings:
>>         LANGUAGE = "en_US:en",
>>         LC_ALL = (unset),
>>         LANG = "en_US"
>>     are supported and installed on your system.
>> perl: warning: Falling back to the standard locale ("C")
>>
>> After doing a bit of hunting on methods to set this, including these
>> pages:
>> http://www.in-ulm.de/~mascheck/locale/#short
>> http://perldoc.perl.org/perllocale.html#Permanently-fixing-your-system's-locale-configuration
>>
>> I started looking closely at glibc-common, as when I did "locale -a" I
>> got the message that locale directories could not be found.
>>
>> I checked, and indeed- rpm -q glibc-common reported that the package
>> was installed. However, after checking some of the files included that
>> should have existed, I found that the local dirs were not there
>> (example: /usr/lib/locale/en_US/LC_TIME). So, I grabbed the
>> glibc-common rpm and did a rpm -ivh --force,  and voila- all was
>> properly installed.
>>
>> The purpose of my post is to document this for others who may have run
>> into this, and t solicit any theories as to why that package was
>> "phantomly" installed. Significantly, other than the locale issue- the
>> system was operating properly.
>>
>> Thanks- and so far quite impressed
>>
>>
>
-- 
Thorsten Schifferdecker
email ts@systs.org
phone +49 (0) 911 50 63 69 82
Re: perl LOCALE issue- and solution [message #24803 is a reply to message #24781] Mon, 10 December 2007 17:43 Go to previous message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

Added: http://wiki.openvz.org/Locales_inside_VE
Thorsten, thanks for this info - never knew about ssh overrides.

Thanks,
Kirill

Thorsten Schifferdecker wrote:
> Hi,
> 
> or Disable overideing LC_* variables in /etc/ssh/sshd_config:
> 
> # Allow client to pass locale environment variables
> AcceptEnv LANG LC_*
> 
> to
> #AcceptEnv LANG LC_*
> 
> so default LC ist used.
> 
> Regards,
>  Thorsten
> 
> Am Mo, 10.12.2007, 12:55, schrieb Kirill Korotaev:
> 
>>was it -minimal template?
>>Some of templates AFAIK have removed locales,
>>since locales take really much space (~20Mb) while not needed in most
>>cases
>>(except for the default C one).
>>
>>Thanks,
>>Kirill
>>
>>
>>Michael Klatsky wrote:
>>
>>>Hello all-
>>>
>>>I ran into a puzzling issue and found a solution- but I am wondering
>>>what the root cause really was, and whether others have run into this:
>>>
>>>After create a VE using the repo provided centos-4-i386-default
>>>template, I entered the VE via ssh. When running perl (any perl
>>>script), I got the message:
>>>
>>>perl: warning: Setting locale failed.
>>>perl: warning: Please check that your locale settings:
>>>        LANGUAGE = "en_US:en",
>>>        LC_ALL = (unset),
>>>        LANG = "en_US"
>>>    are supported and installed on your system.
>>>perl: warning: Falling back to the standard locale ("C")
>>>
>>>After doing a bit of hunting on methods to set this, including these
>>>pages:
>>>http://www.in-ulm.de/~mascheck/locale/#short
>>>http://perldoc.perl.org/perllocale.html#Permanently-fixing-your-system's-locale-configuration
>>>
>>>I started looking closely at glibc-common, as when I did "locale -a" I
>>>got the message that locale directories could not be found.
>>>
>>>I checked, and indeed- rpm -q glibc-common reported that the package
>>>was installed. However, after checking some of the files included that
>>>should have existed, I found that the local dirs were not there
>>>(example: /usr/lib/locale/en_US/LC_TIME). So, I grabbed the
>>>glibc-common rpm and did a rpm -ivh --force,  and voila- all was
>>>properly installed.
>>>
>>>The purpose of my post is to document this for others who may have run
>>>into this, and t solicit any theories as to why that package was
>>>"phantomly" installed. Significantly, other than the locale issue- the
>>>system was operating properly.
>>>
>>>Thanks- and so far quite impressed
>>>
>>>
>>
Previous Topic: Help disk qouta error
Next Topic: OpenVZ specific patchset
Goto Forum:
  


Current Time: Tue Mar 19 07:41:44 GMT 2024

Total time taken to generate the page: 0.02447 seconds