[lxc-users] [LXC] locale: Cannot set LC_CTYPE to default locale: No such file or directory

Eric Keller keller.eric at gmail.com
Sat Nov 8 11:08:37 UTC 2014


Hi all,

digging a bit more into local-gen update-locale, ... I fund that apparmor
makes some problem. Here is some other post from launchpad:

https://bugs.launchpad.net/ubuntu/+source/langpack-locales/+bug/931717

The last link  does give some workaround which is already implemented in
the apparmor lxc-default profile. Currently disabling apparmor when
configuring locales in the container, and re-enabling apparmor afterwards

Cheers

-- 
Eric Keller

On Sat, Nov 8, 2014 at 8:53 AM, Eric Keller <keller.eric at gmail.com> wrote:

> Hi everyone,
>
> I am currently using LXC (debian wheezy) container on my Ubuntu 12.04 64
> bit distribution.
>
> setting up the container, goes fine but the locale are not working
> accordingly.
>
> $ 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=en_US.UTF-8
> LANGUAGE=en_US:
> 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 did apply the usual tricks (https://wiki.debian.org/Locale) to setup
> the locale in vain. The locale command continue to throw me the same errors!
>
> the update-locale also behave in a strange way:
> sudo /usr/sbin/update-locale
> perl: warning: Setting locale failed.
> perl: warning: Please check that your locale settings:
>         LANGUAGE = "en_US:",
>         LC_ALL = (unset),
>         LC_CTYPE = "en_US.UTF-8",
>         LANG = "en_US.UTF-8"
>     are supported and installed on your system.
> perl: warning: Falling back to the standard locale ("C").
> *** update-locale: Error: invalid locale settings:  LANG=en_US.UTF-8
>
> as does the dpkg-reconfigure locales:
>
> sudo dpkg-reconfigure -f noninteractive locales
> perl: warning: Setting locale failed.
> perl: warning: Please check that your locale settings:
>         LANGUAGE = "en_US:",
>         LC_ALL = (unset),
>         LC_CTYPE = "en_US.UTF-8",
>         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
> Generating locales (this might take a while)...
>   en_US.UTF-8...cannot change mode of new locale archive: No such file or
> directory
>  done
> Generation complete.
> perl: warning: Setting locale failed.
> perl: warning: Please check that your locale settings:
>         LANGUAGE = "en_US:",
>         LC_ALL = (unset),
>         LC_CTYPE = "en_US.UTF-8",
>         LANG = "C"
>     are supported and installed on your system.
> perl: warning: Falling back to the standard locale ("C").
>
> has someone a hint where I could investigate
>
> N.B.: /etc/default/locale /etc/locale.gen and /etc/profile are set
> according to the debian wiki page
>
> here are the deailed setup steps executed in the container as root:
>
> apt-get purge locales-all
> dpkg-reconfigure -f noninteractive locales
> echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
> echo "en_US.UTF-8 UTF-8" > /etc/default/locale
> /usr/sbin/locale-gen
> echo ": ${LANG:=en_US.UTF-8}; export LANG" > /etc/profile.d/language
>
> Regards
> --
> Eric Keller
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20141108/fac5ba21/attachment.html>


More information about the lxc-users mailing list