Sunday, 26 May 2013

Debootstrap locales error, unable to install locales to fix it?

Debootstrap locales error, unable to install locales to fix it?

I'm writing a script that downloads various releases using 'debootstrap' and installs some necessary packages on it (including locales), then packages it for use in another script.
I get the following error when running the command inside the chroot:
# locale-gen en_US.UTF-8;update-locale LANG=en_US.UTF-8
Generating locales (this might take a while)...
Generation complete.
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
*** update-locale: Error: invalid locale settings:  LANG=en_US.UTF-8
When I run "export LANG='en_US.UTF-8'" it reports no errors, but it does not fix any issues.
So the question is, how can I fix these locales errors?
PS: I can post part of the script source if it would help.

No comments:

Post a Comment