Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
perl warning: setting locale failed #8398
When some perl scripts are run, this warning message is outputted:
Here's my nix configuration: https://github.com/andrewrk/dotfiles/blob/e3bf84568abe49af84c5bb45c0954d3a1d5f73fa/nixconfigs/configuration.nix
Ran into this issue on openSUSE Leap 42.1 as well, and it actually broke the installation of the Brackets package for me. This workaround worked for me:
nix-env -iA nixpkgs.glibcLocales
Then add the following to the end of your
export LOCALE_ARCHIVE="$(readlink ~/.nix-profile/lib/locale)/locale-archive"
Then restart your shell, and reinstall the package if needed. Not sure how to do the latter correctly - I went for the nuclear option by removing the store paths and running a repair, but that might have undesirable consequences. Perhaps @edolstra can clarify on the correct way to do this?
I don't know whether this workaround affects non-Nix stuff - as far as I can tell,
I do agree that this seems like a source of impurity, and should probably be fixed somehow.
To add visibility in search engines, I was experiencing this issue with non-perl programs - bash and python to be specific. The cause for me, I believe, is that I have my system (NixOS) following the stable channel, but my user environment following the unstable channel. My theory (I don't have any understanding of locale settings or
Following @joepie91's suggestion above fixed my problem.
added a commit
Sep 15, 2017
I have the same issue and @joepie91 suggestion did not work for me.
@joepie91's solution does work, but for reasons which are unknown to me, if it is not installed as part of the profile then this does not work. Just setting the environment variable does not work.