[Nix-dev] Re: perl: warning: Setting locale failed.

Lluís Batlle viriketo at gmail.com
Sun May 31 10:48:36 CEST 2009


Since the stdenv merge, I think, you have to explicitly install your locales.
In nixos, you can add in your configuration:
  environment = {
    extraPackages = [ pkgs.glibcLocales ];
  }

Further then, the locale system expects the locale archive (where all
the locales are compiled) in the path pointed by the env var
LOCALE_ARCHIVE (Nix-only feature of glibc). In my .bashrc I have:
export LOCALE_ARCHIVE=/var/run/current-system/sw/lib/locale/locale-archive

Btw, I vote for adding that export line into the boot stage 2 script,
if the file exists. And I vote for having the glibcLocales package
installed *by default*.

Anyone against?

2009/5/31 Ludovic Courtès <ludo at gnu.org>:
> Hi,
>
> Tony White <tonywhite100 at googlemail.com>
> writes:
>
>> perl: warning: Setting locale failed.
>> perl: warning: Please check that your locale settings:
>>         LANGUAGE = "",
>>         LC_ALL = (unset),
>>         LANG = "en_GB.UTF-8"
>>     are supported and installed on your system.
>
> This means that the `en_GB.UTF-8' locale isn't available on your
> system (info "(libc) Setting the Locale").
>
> Normally `locale -a' lists the available locales.  However, I suspect it
> to be broken on NixOS because it sees only `C' and `POSIX' whereas
> setlocale(3) succeeds with many other locales.
>
> Thanks,
> Ludo'.
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at cs.uu.nl
> https://mail.cs.uu.nl/mailman/listinfo/nix-dev
>



More information about the nix-dev mailing list