jeaye / nixos-in-place

Install NixOS on top of any existing Linux distribution without rebooting
MIT License
458 stars 57 forks source link

"Failure to set locale" stopping installation #28

Closed rockbmb closed 7 years ago

rockbmb commented 7 years ago

Hey,

I'm running Ubuntu 16.04, and after running sudo ./install to start the process, the ISO is downloaded, I get to NixOS Stage 2, and then I get the following logs:

<<< NixOS Stage 2 >>>

not remounting /
mkdir: cannot create directory '/run/keys': No such file or directory
mount: mount point /run/keys does not exist
chown: cannot access '/run/keys': No such file or directory
chmod: cannot access '/run/keys': No such file or directory
running activation script...
setting up /etc...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US",
    LC_ALL = (unset),
    LC_PAPER = "pt_PT.UTF-8",
    LC_ADDRESS = "pt_PT.UTF-8",
    LC_MONETARY = "pt_PT.UTF-8",
    LC_NUMERIC = "pt_PT.UTF-8",
    LC_TELEPHONE = "pt_PT.UTF-8",
    LC_IDENTIFICATION = "pt_PT.UTF-8",
    LC_MEASUREMENT = "pt_PT.UTF-8",
    LC_CTYPE = "pt_PT.UTF-8",
    LC_TIME = "pt_PT.UTF-8",
    LC_NAME = "pt_PT.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US",
    LC_ALL = (unset),
    LC_PAPER = "pt_PT.UTF-8",
    LC_ADDRESS = "pt_PT.UTF-8",
    LC_MONETARY = "pt_PT.UTF-8",
    LC_NUMERIC = "pt_PT.UTF-8",
    LC_TELEPHONE = "pt_PT.UTF-8",
    LC_IDENTIFICATION = "pt_PT.UTF-8",
    LC_MEASUREMENT = "pt_PT.UTF-8",
    LC_CTYPE = "pt_PT.UTF-8",
    LC_TIME = "pt_PT.UTF-8",
    LC_NAME = "pt_PT.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
mount: /dev/pts not mounted or bad option

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
mount: /dev/shm not mounted or bad option

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
mount: /run not mounted or bad option

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
Initializing machine ID from random generator.
unpacking the NixOS/Nixpkgs sources...
created 1 symlinks in user environment
starting /nixos-in-place/stage2...
installing ‘pcre-8.39’
download-using-manifests.pl: perl: warning: Setting locale failed.
download-using-manifests.pl: perl: warning: Please check that your locale settings:
download-using-manifests.pl:    LANGUAGE = "en_US",
download-using-manifests.pl:    LC_ALL = (unset),
download-using-manifests.pl:    LC_PAPER = "pt_PT.UTF-8",
download-using-manifests.pl:    LC_ADDRESS = "pt_PT.UTF-8",
download-using-manifests.pl:    LC_MONETARY = "pt_PT.UTF-8",
download-using-manifests.pl:    LC_NUMERIC = "pt_PT.UTF-8",
download-using-manifests.pl:    LC_TELEPHONE = "pt_PT.UTF-8",
download-using-manifests.pl:    LC_IDENTIFICATION = "pt_PT.UTF-8",
download-using-manifests.pl:    LC_MEASUREMENT = "pt_PT.UTF-8",
download-using-manifests.pl:    LC_CTYPE = "pt_PT.UTF-8",
download-using-manifests.pl:    LC_TIME = "pt_PT.UTF-8",
download-using-manifests.pl:    LC_NAME = "pt_PT.UTF-8",
download-using-manifests.pl:    LANG = "en_US.UTF-8"
download-using-manifests.pl:     are supported and installed on your system.
download-using-manifests.pl: perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
download-from-binary-cache.pl: perl: warning: Setting locale failed.
download-from-binary-cache.pl: perl: warning: Please check that your locale settings:
download-from-binary-cache.pl:  LANGUAGE = "en_US",
download-from-binary-cache.pl:  LC_ALL = (unset),
download-from-binary-cache.pl:  LC_PAPER = "pt_PT.UTF-8",
download-from-binary-cache.pl:  LC_ADDRESS = "pt_PT.UTF-8",
download-from-binary-cache.pl:  LC_MONETARY = "pt_PT.UTF-8",
download-from-binary-cache.pl:  LC_NUMERIC = "pt_PT.UTF-8",
download-from-binary-cache.pl:  LC_TELEPHONE = "pt_PT.UTF-8",
download-from-binary-cache.pl:  LC_IDENTIFICATION = "pt_PT.UTF-8",
download-from-binary-cache.pl:  LC_MEASUREMENT = "pt_PT.UTF-8",
download-from-binary-cache.pl:  LC_CTYPE = "pt_PT.UTF-8",
download-from-binary-cache.pl:  LC_TIME = "pt_PT.UTF-8",
download-from-binary-cache.pl:  LC_NAME = "pt_PT.UTF-8",
download-from-binary-cache.pl:  LANG = "en_US.UTF-8"
download-from-binary-cache.pl:     are supported and installed on your system.
download-from-binary-cache.pl: perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
these paths will be fetched (0.38 MiB download, 1.84 MiB unpacked):
  /nix/store/2z89ljhi3mgs7d1fwvlk0751mgzkisa6-pcre-8.39-bin
  /nix/store/dc2ix1i9laafk2r7n8b4anz3494grc09-pcre-8.39-doc
  /nix/store/frz4awqgmyafpgi0nnkvrl2z5rag5rh8-pcre-8.39-man
  /nix/store/zay4pq5zc26bc664mhw1smx0s8jy0wv6-pcre-8.39-dev
fetching path ‘/nix/store/dc2ix1i9laafk2r7n8b4anz3494grc09-pcre-8.39-doc’...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US",
    LC_ALL = (unset),
    LC_PAPER = "pt_PT.UTF-8",
    LC_ADDRESS = "pt_PT.UTF-8",
    LC_MONETARY = "pt_PT.UTF-8",
    LC_NUMERIC = "pt_PT.UTF-8",
    LC_TELEPHONE = "pt_PT.UTF-8",
    LC_IDENTIFICATION = "pt_PT.UTF-8",
    LC_MEASUREMENT = "pt_PT.UTF-8",
    LC_CTYPE = "pt_PT.UTF-8",
    LC_TIME = "pt_PT.UTF-8",
    LC_NAME = "pt_PT.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").

*** Downloading ‘https://cache.nixos.org/nar/0c0jc001ka6cgx4ivp098pi08fkj6qzc1a1yw0w6l1bixaw4whs7.nar.xz’ (signed by ‘cache.nixos.org-1’) to ‘/nix/store/dc2ix1i9laafk2r7n8b4anz3494grc09-pcre-8.39-doc’...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  309k  100  309k    0     0   476k      0 --:--:-- --:--:-- --:--:--  481k

fetching path ‘/nix/store/2z89ljhi3mgs7d1fwvlk0751mgzkisa6-pcre-8.39-bin’...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US",
    LC_ALL = (unset),
    LC_PAPER = "pt_PT.UTF-8",
    LC_ADDRESS = "pt_PT.UTF-8",
    LC_MONETARY = "pt_PT.UTF-8",
    LC_NUMERIC = "pt_PT.UTF-8",
    LC_TELEPHONE = "pt_PT.UTF-8",
    LC_IDENTIFICATION = "pt_PT.UTF-8",
    LC_MEASUREMENT = "pt_PT.UTF-8",
    LC_CTYPE = "pt_PT.UTF-8",
    LC_TIME = "pt_PT.UTF-8",
    LC_NAME = "pt_PT.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").

*** Downloading ‘https://cache.nixos.org/nar/0ag5z27s80xr1lrwn0lx4j5cd229j8xsyybyshzpy9nzx4897b8x.nar.xz’ (signed by ‘cache.nixos.org-1’) to ‘/nix/store/2z89ljhi3mgs7d1fwvlk0751mgzkisa6-pcre-8.39-bin’...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 41936  100 41936    0     0   190k      0 --:--:-- --:--:-- --:--:--  194k

fetching path ‘/nix/store/frz4awqgmyafpgi0nnkvrl2z5rag5rh8-pcre-8.39-man’...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US",
    LC_ALL = (unset),
    LC_PAPER = "pt_PT.UTF-8",
    LC_ADDRESS = "pt_PT.UTF-8",
    LC_MONETARY = "pt_PT.UTF-8",
    LC_NUMERIC = "pt_PT.UTF-8",
    LC_TELEPHONE = "pt_PT.UTF-8",
    LC_IDENTIFICATION = "pt_PT.UTF-8",
    LC_MEASUREMENT = "pt_PT.UTF-8",
    LC_CTYPE = "pt_PT.UTF-8",
    LC_TIME = "pt_PT.UTF-8",
    LC_NAME = "pt_PT.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").

*** Downloading ‘https://cache.nixos.org/nar/0s058s15i7bnrv20fk6lh9czd2kv9y63565fycyviybqnrg7jaws.nar.xz’ (signed by ‘cache.nixos.org-1’) to ‘/nix/store/frz4awqgmyafpgi0nnkvrl2z5rag5rh8-pcre-8.39-man’...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 27664  100 27664    0     0   153k      0 --:--:-- --:--:-- --:--:--  157k

fetching path ‘/nix/store/zay4pq5zc26bc664mhw1smx0s8jy0wv6-pcre-8.39-dev’...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US",
    LC_ALL = (unset),
    LC_PAPER = "pt_PT.UTF-8",
    LC_ADDRESS = "pt_PT.UTF-8",
    LC_MONETARY = "pt_PT.UTF-8",
    LC_NUMERIC = "pt_PT.UTF-8",
    LC_TELEPHONE = "pt_PT.UTF-8",
    LC_IDENTIFICATION = "pt_PT.UTF-8",
    LC_MEASUREMENT = "pt_PT.UTF-8",
    LC_CTYPE = "pt_PT.UTF-8",
    LC_TIME = "pt_PT.UTF-8",
    LC_NAME = "pt_PT.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").

*** Downloading ‘https://cache.nixos.org/nar/04s36b6sg630j1mvh9vjh02biy5fl9mkl9rvpgdj71y76gayzp57.nar.xz’ (signed by ‘cache.nixos.org-1’) to ‘/nix/store/zay4pq5zc26bc664mhw1smx0s8jy0wv6-pcre-8.39-dev’...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7884  100  7884    0     0  44160      0 --:--:-- --:--:-- --:--:-- 44795

building path(s) ‘/nix/store/d3x2yrkm76sd9mlnv4jalj1in2aaqhgg-user-environment’
created 18 symlinks in user environment
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US",
    LC_ALL = (unset),
    LC_PAPER = "pt_PT.UTF-8",
    LC_ADDRESS = "pt_PT.UTF-8",
    LC_MONETARY = "pt_PT.UTF-8",
    LC_NUMERIC = "pt_PT.UTF-8",
    LC_TELEPHONE = "pt_PT.UTF-8",
    LC_IDENTIFICATION = "pt_PT.UTF-8",
    LC_MEASUREMENT = "pt_PT.UTF-8",
    LC_CTYPE = "pt_PT.UTF-8",
    LC_TIME = "pt_PT.UTF-8",
    LC_NAME = "pt_PT.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
writing /nixos/etc/nixos/hardware-configuration.nix...
writing /nixos/etc/nixos/configuration.nix...
pcregrep: Failed to set locale pt_PT.UTF-8 (obtained from LC_CTYPE)

I tried running the process a couple more times, after rebooting as well, all to no avail. (Incidentally, how should I delete the redundant attempted installations?)

Some clarification would be appreciated.

Edit: I should add that these pt_PTs throughout probably stand for Portugal, I don't know why it would matter in this case (probably keyboard or hardware definitions)

jeaye commented 7 years ago

Is your locale intentionally pt_PT.UTF-8, or do you want it to be en_US.UTF-8 or similar? I have never seen this error before, but it very much seems to be Perl related, more so than NixOS-related.

Have you taken a look at https://freethegnu.wordpress.com/2007/10/22/how-to-fix-the-locale-settings/ ? It was the first result from a search to DDG with Please check that your locale settings "pt_PT.UTF-8".

(Incidentally, how should I delete the redundant attempted installations?)

When you run the install script, it will output its working directory, which is typically somewhere in /tmp/. You're welcome to rm -rf it if the installation fails.

domenkozar commented 7 years ago

This is a glibc compatibility issue, see https://github.com/NixOS/nixpkgs/issues/8398

jeaye commented 7 years ago

Thanks, @domenkozar! :)