NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.86k stars 13.93k forks source link

Issue installing nix on debian 9 (with solution) #61271

Closed nekopep closed 4 years ago

nekopep commented 5 years ago

Issue description

Hi nixpkgs team, just a quick feedback from a first install user. I wanted to install pijul that uses nix pkg to distribute itself. I'm using debian 9 (with all updates)

Steps to reproduce

$curl https://nixos.org/nix/install | sh

The main issue I encountered was an error at the end of process install:

nix error: cloning builder process: Operation not permitted

I had to create a /etc/sysctl.d/nix.conf kernel.unprivileged_userns_clone=1

It seems to be a known issue, perhaps it could be added in the install doc or the installer could say to do that after "Operation not permitted"?

Technical details

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

these paths will be fetched (47.27 MiB download, 201.06 MiB unpacked): /nix/store/14bfx6qbvhisgiwg903a4759hdyarkj1-gnutar-1.32 /nix/store/1gw1mzd1dgxv9jl9292cy89agkn6igcw-bash-interactive-4.4-p23-dev /nix/store/1kl6ms8x56iyhylb2r83lq7j3jbnix7w-binutils-2.31.1 /nix/store/2hr6x9f9ivljdr2dkh4sz2wyhmpn8xmc-diffutils-3.7 /nix/store/379yd8pmrr4c6i6gsacyds8k46n0p047-bash-interactive-4.4-p23-info /nix/store/4plig3fph140mc2d13lc80nrky3n644h-pcre-8.43 /nix/store/5lyvydxv0w4f2s1ba84pjlbpvqkgn1ni-linux-headers-4.19.16 /nix/store/5zdqndi3fk72n4drd38wzmgbrqhlaciv-xz-5.2.4-bin /nix/store/79gnjysbw3zkjqawx2ajs29w92q1v44a-ncurses-6.1-20190112 /nix/store/7yjxqw8187sj0py0vixnnfwjprgq9m32-attr-2.4.48 /nix/store/b085vr7sks32sv9ls3q24a878blxp4g7-xz-5.2.4 /nix/store/b9kmciqh6n9z2b1lg4dlfbh1qzq2pq8z-gawk-4.2.1 /nix/store/baylddnb83lh45v3fz15ddhbpxbdb7m7-coreutils-8.31 /nix/store/bd2sn66007fvkvvn2sk3ga69dgpxpsqq-patchelf-0.9 /nix/store/bv1fz2naz0byqy8j6d8bfjxiybq36d20-bash-interactive-4.4-p23-doc /nix/store/d9cv4lh32as716x3d9p9ikdh7j2kqrdh-gzip-1.10 /nix/store/dlqjzmrdlp3vipfwyfz2n39cpf1ad2j6-acl-2.2.53 /nix/store/ds68m7w92kxc16x5xskndx8g53jc0iqs-readline-7.0p5 /nix/store/f5wl80zkrd3fc1jxsljmnpn7y02lz6v1-glibc-2.27-bin /nix/store/fwjg5nq86pa0vf2pkmqfsiwvp6x9wcn2-gnugrep-3.3 /nix/store/h67k75i4wm7jkyaan97xzw0g38vm3yxa-gnused-4.7 /nix/store/iiymx8j7nlar3gc23lfkcscvr61fng8s-zlib-1.2.11 /nix/store/j4pdk5acgkdp17pbjdprvd8ananpj0nr-binutils-wrapper-2.31.1 /nix/store/jx8g6cjv2y5rs69ym08b0pj3ngxvnhhg-bash-interactive-4.4-p23 /nix/store/k4v41as11lyg5rbm80vdxwmbqnbc3a3r-gcc-7.4.0-lib /nix/store/lxfaqdlhma5x6jka1bq3pacdqsbxnhah-ed-1.15 /nix/store/mwx2860fvs3fq5dyzassvbkrkys63qsf-expand-response-params /nix/store/n8ryapl9c33h9w7ffrk7s592ah38a7cj-nix-info /nix/store/plcgyqkiqb599q42cczkqhnrii6pav6w-bzip2-1.0.6.0.1-bin /nix/store/pm4rg0bdiaj5b748kncp9vf7n3x446sd-gcc-7.4.0 /nix/store/r432g6h0qy7wq18kksdbm9f72h0wx7yv-findutils-4.6.0 /nix/store/sm00b8v1rhfqq5hba9wv1fw9iwvw1348-bzip2-1.0.6.0.1 /nix/store/sr4253np2gz2bpha4gn8gqlmiw604155-glibc-2.27-dev /nix/store/v0kpr6h52a8wl07krzm65p3r74cpvmra-stdenv-linux /nix/store/w2px3blinprrzx6wva8x7m0l9l27jzj9-gcc-wrapper-7.4.0 /nix/store/xkzym3c0r5368lxs2m9h247c93m0hiv2-patch-2.7.6 /nix/store/ybq0y45n1ksgv5wiqmb9823jjbwa8a9y-bash-interactive-4.4-p23-man /nix/store/yg76yir7rkxkfz6p77w4vjasi3cgc0q6-gnumake-4.2.1 /nix/store/yjkch3aia9ny4dq42dbcjrdwqb1y8c33-bash-4.4-p23 copying path '/nix/store/bv1fz2naz0byqy8j6d8bfjxiybq36d20-bash-interactive-4.4-p23-doc' from 'https://cache.nixos.org'... copying path '/nix/store/7yjxqw8187sj0py0vixnnfwjprgq9m32-attr-2.4.48' from 'https://cache.nixos.org'... copying path '/nix/store/yjkch3aia9ny4dq42dbcjrdwqb1y8c33-bash-4.4-p23' from 'https://cache.nixos.org'... copying path '/nix/store/dlqjzmrdlp3vipfwyfz2n39cpf1ad2j6-acl-2.2.53' from 'https://cache.nixos.org'... copying path '/nix/store/379yd8pmrr4c6i6gsacyds8k46n0p047-bash-interactive-4.4-p23-info' from 'https://cache.nixos.org'... copying path '/nix/store/ybq0y45n1ksgv5wiqmb9823jjbwa8a9y-bash-interactive-4.4-p23-man' from 'https://cache.nixos.org'... copying path '/nix/store/sm00b8v1rhfqq5hba9wv1fw9iwvw1348-bzip2-1.0.6.0.1' from 'https://cache.nixos.org'... copying path '/nix/store/baylddnb83lh45v3fz15ddhbpxbdb7m7-coreutils-8.31' from 'https://cache.nixos.org'... copying path '/nix/store/plcgyqkiqb599q42cczkqhnrii6pav6w-bzip2-1.0.6.0.1-bin' from 'https://cache.nixos.org'... copying path '/nix/store/2hr6x9f9ivljdr2dkh4sz2wyhmpn8xmc-diffutils-3.7' from 'https://cache.nixos.org'... copying path '/nix/store/lxfaqdlhma5x6jka1bq3pacdqsbxnhah-ed-1.15' from 'https://cache.nixos.org'... copying path '/nix/store/mwx2860fvs3fq5dyzassvbkrkys63qsf-expand-response-params' from 'https://cache.nixos.org'... copying path '/nix/store/r432g6h0qy7wq18kksdbm9f72h0wx7yv-findutils-4.6.0' from 'https://cache.nixos.org'... copying path '/nix/store/b9kmciqh6n9z2b1lg4dlfbh1qzq2pq8z-gawk-4.2.1' from 'https://cache.nixos.org'... copying path '/nix/store/k4v41as11lyg5rbm80vdxwmbqnbc3a3r-gcc-7.4.0-lib' from 'https://cache.nixos.org'... copying path '/nix/store/f5wl80zkrd3fc1jxsljmnpn7y02lz6v1-glibc-2.27-bin' from 'https://cache.nixos.org'... copying path '/nix/store/yg76yir7rkxkfz6p77w4vjasi3cgc0q6-gnumake-4.2.1' from 'https://cache.nixos.org'... copying path '/nix/store/h67k75i4wm7jkyaan97xzw0g38vm3yxa-gnused-4.7' from 'https://cache.nixos.org'... copying path '/nix/store/14bfx6qbvhisgiwg903a4759hdyarkj1-gnutar-1.32' from 'https://cache.nixos.org'... copying path '/nix/store/d9cv4lh32as716x3d9p9ikdh7j2kqrdh-gzip-1.10' from 'https://cache.nixos.org'... copying path '/nix/store/5lyvydxv0w4f2s1ba84pjlbpvqkgn1ni-linux-headers-4.19.16' from 'https://cache.nixos.org'... copying path '/nix/store/79gnjysbw3zkjqawx2ajs29w92q1v44a-ncurses-6.1-20190112' from 'https://cache.nixos.org'... copying path '/nix/store/sr4253np2gz2bpha4gn8gqlmiw604155-glibc-2.27-dev' from 'https://cache.nixos.org'... copying path '/nix/store/xkzym3c0r5368lxs2m9h247c93m0hiv2-patch-2.7.6' from 'https://cache.nixos.org'... copying path '/nix/store/bd2sn66007fvkvvn2sk3ga69dgpxpsqq-patchelf-0.9' from 'https://cache.nixos.org'... copying path '/nix/store/4plig3fph140mc2d13lc80nrky3n644h-pcre-8.43' from 'https://cache.nixos.org'... copying path '/nix/store/ds68m7w92kxc16x5xskndx8g53jc0iqs-readline-7.0p5' from 'https://cache.nixos.org'... copying path '/nix/store/fwjg5nq86pa0vf2pkmqfsiwvp6x9wcn2-gnugrep-3.3' from 'https://cache.nixos.org'... copying path '/nix/store/jx8g6cjv2y5rs69ym08b0pj3ngxvnhhg-bash-interactive-4.4-p23' from 'https://cache.nixos.org'... copying path '/nix/store/n8ryapl9c33h9w7ffrk7s592ah38a7cj-nix-info' from 'https://cache.nixos.org'... copying path '/nix/store/1gw1mzd1dgxv9jl9292cy89agkn6igcw-bash-interactive-4.4-p23-dev' from 'https://cache.nixos.org'... copying path '/nix/store/b085vr7sks32sv9ls3q24a878blxp4g7-xz-5.2.4' from 'https://cache.nixos.org'... copying path '/nix/store/iiymx8j7nlar3gc23lfkcscvr61fng8s-zlib-1.2.11' from 'https://cache.nixos.org'... copying path '/nix/store/5zdqndi3fk72n4drd38wzmgbrqhlaciv-xz-5.2.4-bin' from 'https://cache.nixos.org'... copying path '/nix/store/1kl6ms8x56iyhylb2r83lq7j3jbnix7w-binutils-2.31.1' from 'https://cache.nixos.org'... copying path '/nix/store/pm4rg0bdiaj5b748kncp9vf7n3x446sd-gcc-7.4.0' from 'https://cache.nixos.org'... copying path '/nix/store/j4pdk5acgkdp17pbjdprvd8ananpj0nr-binutils-wrapper-2.31.1' from 'https://cache.nixos.org'... copying path '/nix/store/w2px3blinprrzx6wva8x7m0l9l27jzj9-gcc-wrapper-7.4.0' from 'https://cache.nixos.org'... copying path '/nix/store/v0kpr6h52a8wl07krzm65p3r74cpvmra-stdenv-linux' from 'https://cache.nixos.org'...

matthewbauer commented 5 years ago

I think having some info on that would be very helpful. Perhaps the interactive installer could even offer to create that file for you, when it detects that usernamespaces don't work. We probably don't want to make it automatic, because it's possible that some users don't want unpriveleged user namespaces enabled.

nekopep commented 5 years ago

Please see: https://unix.stackexchange.com/questions/494786/cloning-builder-process-operation-not-permitted-when-using-nix-under-linux-up https://github.com/NixOS/nix/issues/2633#issuecomment-455788240 and https://bbs.archlinux.org/viewtopic.php?id=232779

nekopep commented 5 years ago

Perhaps just a comment on the command line interface proposing to do that in case of crash could also be interesting

nekopep commented 5 years ago

Do you want me to relauch the installer without the patch to get a full log?

stale[bot] commented 4 years ago

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.
matthewbauer commented 4 years ago

Fixed by https://github.com/NixOS/nix/pull/3006