NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.09k stars 14.07k forks source link

nix profile install nixpkgs#perl => perl: warning: Setting locale failed. #160915

Open gerardbosch opened 2 years ago

gerardbosch commented 2 years ago

Describe the bug

I install Perl with Nix with the following command:

nix profile install nixpkgs#perl

Then, when I run perl there's always a warning (see below).

If I run the perl binary that comes with my distro (Ubuntu) or I install perl with Linux Homebrew, it works with no issues.

Steps To Reproduce

Steps to reproduce the behavior:

Run perl, e.g.:

❯ perl -e exit
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_TELEPHONE = "es_ES.UTF-8",
    LC_MEASUREMENT = "es_ES.UTF-8",
    LC_NAME = "es_ES.UTF-8",
    LC_PAPER = "es_ES.UTF-8",
    LC_ADDRESS = "es_ES.UTF-8",
    LC_IDENTIFICATION = "es_ES.UTF-8",
    LC_NUMERIC = "es_ES.UTF-8",
    LC_TIME = "es_ES.UTF-8",
    LC_MONETARY = "es_ES.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

Expected behavior

Perl runs with no errors or warnings.

Notify maintainers

Additional context

Installed Perl version:

❯ nix profile list | grep 'perl'             
28 flake:nixpkgs#legacyPackages.x86_64-linux.perl github:NixOS/nixpkgs/b66b39216b1fef2d8c33cc7a5c72d8da80b79970#legacyPackages.x86_64-linux.perl /nix/store/4i0gfyhwf63ycz5j489mgkh2nlinnvfi-perl-5.34.0

Output of locale:

❯ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=es_ES.UTF-8
LC_TIME=es_ES.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=es_ES.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=es_ES.UTF-8
LC_NAME=es_ES.UTF-8
LC_ADDRESS=es_ES.UTF-8
LC_TELEPHONE=es_ES.UTF-8
LC_MEASUREMENT=es_ES.UTF-8
LC_IDENTIFICATION=es_ES.UTF-8
LC_ALL=

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

❯ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.13.0-28-generic, Ubuntu, 21.10 (Impish Indri)`
 - multi-user?: `no`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.4`
 - channels(gerard): `"nixgl, nixpkgs-22.05pre337745.e7caea7700d"`
 - nixpkgs: `/home/gerard/.nix-defexpr/channels/nixpkgs`
patka-123 commented 11 months ago

Hello @gerardbosch :wave:

I'm trying to reproduce your issue with the current Perl version, but I'm failing to do so. Does this mean the issue has been fixed by now? If it is also not an issue for you anymore, would you be able to close this issue?

(I'm going through issues marked as stale to see what can be resolved. If you still experience this issue then don't mind me).

gerardbosch commented 11 months ago

Hi @patka-123 I have tried again, and to me the problem still persists. Maybe it is something on my system or locale, but I was never able to figure it out. I guess you can close it. Cheers!!