perl and locales

Richard Molton richardmolton at
Fri Jan 21 10:36:02 PST 2005

On 21 Jan, Andrei A. Voropaev <av at>    replied to my
email. Thanks.

> > I get error messages saying that LC_CTYPE, LC_MESSAGES AND
> > LC_ALL cannot be set to default locale:no such file or
> > directory.
I get the same messages if I enter the command 'locale' and also if
I enter 'perl -v'

> Do you have /usr/share/locale/C directory? This supposed to be
> default locale.

No, this file is not present. However, my son uses LFS and has two
working installations which also lack this directory.

> Maybe you have defined some other default locale and this one was
> not created during install of glibc? 

I possibly have inadvertently done so, but cannot be sure. I can
see nothing in the glibc section (6.11) which tells me how to
determine what is my default locale. How do I do this?

> You can always create it manually. LFS book mentions this in the
> glibc installation section.

But I wish I could see where! I tried 'localedef --add-to-archive
C' with the result:   

Adding C stat of C failed: no such file or directory: ignored

This was hardly surprising, as I had no idea what parameters were
necessary for the default. I had hoped it might set them

I do incidentally appear to have the complete set of locales
suggested as a minimum in 6.11, and also en-GB which is included in
the list.

Any suggestions?

> -- Minds, like parachutes, function best when open
I suppose I can expect to hit the ground at high speed, then.

More information about the lfs-support mailing list