{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nix/issues/599","labels_url":"https://api.github.com/repos/NixOS/nix/issues/599/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nix/issues/599/comments","events_url":"https://api.github.com/repos/NixOS/nix/issues/599/events","html_url":"https://github.com/NixOS/nix/issues/599","id":100195944,"number":599,"title":"Nix broken by having LANG and LC_* set","user":{"login":"seschwar","id":97081,"avatar_url":"https://avatars.githubusercontent.com/u/97081?v=3","gravatar_id":"","url":"https://api.github.com/users/seschwar","html_url":"https://github.com/seschwar","followers_url":"https://api.github.com/users/seschwar/followers","following_url":"https://api.github.com/users/seschwar/following{/other_user}","gists_url":"https://api.github.com/users/seschwar/gists{/gist_id}","starred_url":"https://api.github.com/users/seschwar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seschwar/subscriptions","organizations_url":"https://api.github.com/users/seschwar/orgs","repos_url":"https://api.github.com/users/seschwar/repos","events_url":"https://api.github.com/users/seschwar/events{/privacy}","received_events_url":"https://api.github.com/users/seschwar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-08-11T00:15:35Z","updated_at":"2015-10-11T02:31:24Z","closed_at":null,"body":"I just tried installing Nix for the first time ever. I have my locale configured are as follows:\r\n\r\n```\r\n$ locale\r\nLANG=de_DE.UTF-8\r\nLC_CTYPE=\"de_DE.UTF-8\"\r\nLC_NUMERIC=en_US.UTF-8\r\nLC_TIME=en_DK.UTF-8\r\nLC_COLLATE=\"de_DE.UTF-8\"\r\nLC_MONETARY=\"de_DE.UTF-8\"\r\nLC_MESSAGES=en_US.UTF-8\r\nLC_PAPER=\"de_DE.UTF-8\"\r\nLC_NAME=\"de_DE.UTF-8\"\r\nLC_ADDRESS=\"de_DE.UTF-8\"\r\nLC_TELEPHONE=\"de_DE.UTF-8\"\r\nLC_MEASUREMENT=\"de_DE.UTF-8\"\r\nLC_IDENTIFICATION=\"de_DE.UTF-8\"\r\nLC_ALL=\r\n```\r\n\r\nTrying to install Nix under Arch Linux as follows fails:\r\n\r\n```\r\n$ curl https://nixos.org/nix/install | sh\r\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n                                 Dload  Upload   Total   Spent    Left  Speed\r\n100  1330  100  1330    0     0   6323      0 --:--:-- --:--:-- --:--:--  6333\r\nunpacking Nix binary tarball for x86_64-linux from `https://nixos.org/releases/nix/nix-1.9/nix-1.9-x86_64-linux.tar.bz2'...\r\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n                                 Dload  Upload   Total   Spent    Left  Speed\r\n100 69.4M  100 69.4M    0     0  2837k      0  0:00:25  0:00:25 --:--:-- 2964k \r\nperforming a single-user installation of Nix...\r\ndirectory /nix does not exist; creating it by running ‘mkdir -m 0755 /nix && chown seschwar /nix’ using sudo\r\ncopying Nix to /nix/store...........................\r\ninitialising Nix database...\r\ncreating /home/seschwar/.nix-profile\r\nln: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_COLLATE) / sizeof (_nl_value_type_LC_COLLATE[0]))' failed.\r\n/nix/store/l598bgyrflylmfxr7c889jcs5amflrsp-nix-1.9/etc/profile.d/nix.sh: line 36: 11062 Aborted                 (core dumped) /nix/store/wc472nw0kyw0iwgl6352ii5czxd97js2-coreutils-8.23/bin/ln -s \"$_NIX_DEF_LINK\" \"$NIX_LINK\"\r\n```\r\n\r\nRerunning the installer with my locale variables unset succeeds, after having cleaned up the previous failed install (`sudo rm -fr /nix`):\r\n\r\n```\r\n$ curl https://nixos.org/nix/install | env -u LANG -u LC_MESSAGES -u LC_TIME -u LC_NUMERIC sh\r\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n                                 Dload  Upload   Total   Spent    Left  Speed\r\n100  1330  100  1330    0     0   6627      0 --:--:-- --:--:-- --:--:--  6650\r\nunpacking Nix binary tarball for x86_64-linux from `https://nixos.org/releases/nix/nix-1.9/nix-1.9-x86_64-linux.tar.bz2'...\r\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n                                 Dload  Upload   Total   Spent    Left  Speed\r\n100 69.4M  100 69.4M    0     0  2930k      0  0:00:24  0:00:24 --:--:-- 2937k\r\nperforming a single-user installation of Nix...\r\ndirectory /nix does not exist; creating it by running ‘mkdir -m 0755 /nix && chown seschwar /nix’ using sudo\r\ncopying Nix to /nix/store...........................\r\ninitialising Nix database...\r\ncreating /home/seschwar/.nix-profile\r\ninstalling ‘nix-1.9’\r\nbuilding path(s) ‘/nix/store/9d63rdn1mszsy5h4fd9x0s215ry6hkrh-user-environment’\r\ncreated 6 symlinks in user environment\r\nWide character in print at /nix/store/l598bgyrflylmfxr7c889jcs5amflrsp-nix-1.9/bin/nix-pull line 55.\r\nfetching list of Nix archives at ‘https://nixos.org/releases/nixpkgs/nixpkgs-15.07pre66732.e190a70//MANIFEST.bz2’...\r\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n                                 Dload  Upload   Total   Spent    Left  Speed\r\n100 9354k  100 9354k    0     0  2756k      0  0:00:03  0:00:03 --:--:-- 2758k\r\ncaching /nix/store/c4sxj5jz1q2snp67kcdnn18gm8x7x04m-MANIFEST.bz2...\r\ndownloading Nix expressions from ‘https://nixos.org/releases/nixpkgs/nixpkgs-15.07pre66732.e190a70//nixexprs.tar.xz’...\r\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n                                 Dload  Upload   Total   Spent    Left  Speed\r\n100 5058k  100 5058k    0     0  2440k      0  0:00:02  0:00:02 --:--:-- 2442k\r\nunpacking channels...\r\ncreated 1 symlinks in user environment\r\n\r\nInstallation finished!  To ensure that the necessary environment\r\nvariables are set, either log in again, or type\r\n\r\n  . /home/seschwar/.nix-profile/etc/profile.d/nix.sh\r\n\r\nin your shell.\r\n```\r\n\r\nThe same thing happens when I'm trying to install a package:\r\n\r\n```\r\n$ nix-env -i nix-repl\r\ninstalling ‘nix-repl-1.9-57aeef0’\r\ndownload-using-manifests.pl: perl: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_COLLATE) / sizeof (_nl_value_type_LC_COLLATE[0]))' failed.\r\nerror: substituter ‘download-using-manifests.pl’ died unexpectedly\r\n$ env -u LANG -u LC_MESSAGES -u LC_TIME -u LC_NUMERIC nix-env -i nix-repl\r\ninstalling ‘nix-repl-1.9-57aeef0’\r\nthese paths will be fetched (56.22 MiB download, 226.81 MiB unpacked):\r\n  /nix/store/2jhsvzb11ybswkq07a835ab8xjwf7m1y-openssl-1.0.1p\r\n  /nix/store/3a45nb37s0ndljp68228snsqr3qsyp96-bzip2-1.0.6\r\n  /nix/store/5fxl43xvrvs3am2cagddn1b3wsk97w9d-libsodium-1.0.3\r\n  /nix/store/664kxr14kfgx4dl095crvmr7pbh9xlh5-nix-1.9\r\n  /nix/store/90kk1lksk1d4i39hpxidfbnrdk341789-perl-WWW-Curl-4.17\r\n  /nix/store/99z3lmh0cscbidgldzww3ndr2dxmmm10-linux-headers-3.12.32\r\n  /nix/store/9jpnrd6zvqpnhvaqzyyvhvsribpwrc8y-curl-7.43.0\r\n  /nix/store/a457ywa1haa0sgr9g7a1pgldrg3s798d-coreutils-8.24\r\n  /nix/store/ai6xabmvklqgkqji1b9dybmrvcw6ahcb-ncurses-5.9\r\n  /nix/store/az2scrkb88l2q09xa0g6lpbv2mh8lxjl-zlib-1.2.8\r\n  /nix/store/b5kdnhvyyrqgcdlswf3jz32h9idj5zzb-readline-6.3p08\r\n  /nix/store/b6zs8832pl1y1rvpl0dkwhf0ksw2c5j8-attr-2.4.47\r\n  /nix/store/caa7csilm0jrxissf994c1dmw6ri7dp7-gcc-4.9.3\r\n  /nix/store/g33gb293p9azw9l5y14zii2xq7p8i104-perl-5.20.2\r\n  /nix/store/h9ffja30df6arwmpzjwqhji9h69lwji6-boehm-gc-7.2f\r\n  /nix/store/mvvkmwv3jzdxqb30fa6haibf01x3qnik-perl-DBD-SQLite-1.48\r\n  /nix/store/nw6diqy1n4xbq7az3r38mc09i3bf8alm-xz-5.2.1\r\n  /nix/store/q0m70q5wg21hxrixkp1xk4x95sfs2fln-glibc-2.21\r\n  /nix/store/rsinzxmvhcng9gggixrvkbs8j9ah24f1-gnutar-1.28\r\n  /nix/store/s97gkc9bm44b7i44pddvyckg9srlivzz-gzip-1.6\r\n  /nix/store/sn6hkxphm2xkar53j6y52wbivr4z5lfr-perl-DBI-1.633\r\n  /nix/store/xdpasnbq5c4q2v0bya1cyghz6pxki9ia-acl-2.2.52\r\n  /nix/store/yijns3m4bpd5xnkiyds44b2ijp8map04-sqlite-3.8.10.2\r\n  /nix/store/yllvrc74nik3c02xaknahx90psrbkr9r-nix-repl-1.9-57aeef0\r\n  /nix/store/zmd4jk4db5lgxb8l93mhkvr3x92g2sx2-bash-4.3-p39\r\n  /nix/store/zqwwn2iglsrmac314azkgwhyyc2jn0y4-libssh2-1.6.0\r\nfetching path ‘/nix/store/99z3lmh0cscbidgldzww3ndr2dxmmm10-linux-headers-3.12.32’...\r\n\r\n*** Trying to download/patch ‘/nix/store/99z3lmh0cscbidgldzww3ndr2dxmmm10-linux-headers-3.12.32’\r\n\r\n*** Step 1/1: downloading ‘https://cache.nixos.org/nar/10x1knfa7pfrx1m2jj4rnflm1qd2xr7ydc0nda16f6ynkva9abx0.nar.xz’ to ‘/nix/store/99z3lmh0cscbidgldzww3ndr2dxmmm10-linux-headers-3.12.32’\r\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n                                 Dload  Upload   Total   Spent    Left  Speed\r\n100  680k  100  680k    0     0   768k      0 --:--:-- --:--:-- --:--:--  770k\r\n\r\nfetching path ‘/nix/store/q0m70q5wg21hxrixkp1xk4x95sfs2fln-glibc-2.21’...\r\n\r\n*** Trying to download/patch ‘/nix/store/q0m70q5wg21hxrixkp1xk4x95sfs2fln-glibc-2.21’\r\n\r\n(...)\r\n\r\nbuilding path(s) ‘/nix/store/64k4bjgrasc13l5c7jcz8v58vkxvxqnb-user-environment’\r\ncreated 23 symlinks in user environment\r\n```\r\n\r\nHow am I supposed to set up my locale so that it doesn't break Nix? Would I have to call `localedef` in each `glibc` package? But weren't these supposed to be read only?\r\n\r\nAnd shouldn't the installer take care of all that? Producing a broken installation is not very helpful. :wink:"},"comment":{"url":"https://api.github.com/repos/NixOS/nix/issues/comments/147147064","html_url":"https://github.com/NixOS/nix/issues/599#issuecomment-147147064","issue_url":"https://api.github.com/repos/NixOS/nix/issues/599","id":147147064,"user":{"login":"vyp","id":3889405,"avatar_url":"https://avatars.githubusercontent.com/u/3889405?v=3","gravatar_id":"","url":"https://api.github.com/users/vyp","html_url":"https://github.com/vyp","followers_url":"https://api.github.com/users/vyp/followers","following_url":"https://api.github.com/users/vyp/following{/other_user}","gists_url":"https://api.github.com/users/vyp/gists{/gist_id}","starred_url":"https://api.github.com/users/vyp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vyp/subscriptions","organizations_url":"https://api.github.com/users/vyp/orgs","repos_url":"https://api.github.com/users/vyp/repos","events_url":"https://api.github.com/users/vyp/events{/privacy}","received_events_url":"https://api.github.com/users/vyp/received_events","type":"User","site_admin":false},"created_at":"2015-10-11T02:31:24Z","updated_at":"2015-10-11T02:31:24Z","body":"Same. Though my `locale` is:\r\n\r\n```\r\nLANG=en_US.UTF-8\r\nLC_CTYPE=\"en_US.UTF-8\"\r\nLC_NUMERIC=\"en_US.UTF-8\"\r\nLC_TIME=\"en_US.UTF-8\"\r\nLC_COLLATE=\"en_US.UTF-8\"\r\nLC_MONETARY=\"en_US.UTF-8\"\r\nLC_MESSAGES=\"en_US.UTF-8\"\r\nLC_PAPER=\"en_US.UTF-8\"\r\nLC_NAME=\"en_US.UTF-8\"\r\nLC_ADDRESS=\"en_US.UTF-8\"\r\nLC_TELEPHONE=\"en_US.UTF-8\"\r\nLC_MEASUREMENT=\"en_US.UTF-8\"\r\nLC_IDENTIFICATION=\"en_US.UTF-8\"\r\nLC_ALL=\r\n```\r\n\r\n+1"}}