Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't install Nix on my Ubuntu #5522

Open
pdelfino opened this issue Nov 9, 2021 · 5 comments
Open

I can't install Nix on my Ubuntu #5522

pdelfino opened this issue Nov 9, 2021 · 5 comments

Comments

@pdelfino
Copy link

pdelfino commented Nov 9, 2021

Describe the bug

I was trying to install nix on my Ubuntu 20.04 LTS as a package manager. The installation failed. As an error message, there was a suggestion to open an issue about it here.

Steps To Reproduce

  1. After reading the suggestion here, execute sh <(curl -L https://nixos.org/nix/install) --daemon
  2. the installation failed

Expected behavior
I was expecting to be able to use nix-env --version. I can't use it, though. I receive

$ nix env --version

Command 'nix' not found, did you mean...

Additional context

The error message suggests posting the entire "context" here:

~ $ sh <(curl -L https://nixos.org/nix/install) --daemon
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  4024  100  4024    0     0   5900      0 --:--:-- --:--:-- --:--:-- 24687
downloading Nix 2.4 binary tarball for x86_64-linux from 'https://releases.nixos.org/nix/nix-2.4/nix-2.4-x86_64-linux.tar.xz' to '/tmp/nix-binary-tarball-unpack.IgiUobVGqb'...
--2021-11-08 21:36:45--  https://releases.nixos.org/nix/nix-2.4/nix-2.4-x86_64-linux.tar.xz
Resolving releases.nixos.org (releases.nixos.org)... 199.232.114.217, 2a04:4e42:71::729
Connecting to releases.nixos.org (releases.nixos.org)|199.232.114.217|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 28432840 (27M) [application/octet-stream]
Saving to: ‘/tmp/nix-binary-tarball-unpack.IgiUobVGqb/nix-2.4-x86_64-linux.tar.xz’

/tmp/nix-binary-tar 100%[===================>]  27,12M  5,41MB/s    in 5,2s    

2021-11-08 21:36:50 (5,22 MB/s) - ‘/tmp/nix-binary-tarball-unpack.IgiUobVGqb/nix-2.4-x86_64-linux.tar.xz’ saved [28432840/28432840]

Note: a multi-user installation is possible. See https://nixos.org/nix/manual/#sect-multi-user-installation
Switching to the Multi-user Installer
Welcome to the Multi-User Nix Installation

This installation tool will set up your computer with the Nix package
manager. This will happen in a few stages:

1. Make sure your computer doesn't already have Nix. If it does, I
   will show you instructions on how to clean up your old install.

2. Show you what we are going to install and where. Then we will ask
   if you are ready to continue.

3. Create the system users and groups that the Nix daemon uses to run
   builds.

4. Perform the basic installation of the Nix files daemon.

5. Configure your shell to import special Nix Profile files, so you
   can use Nix.

6. Start the Nix daemon.

Would you like to see a more detailed list of what we will do?
[y/n] y


We will:

 - make sure your computer doesn't already have Nix files
   (if it does, I will tell you how to clean them up.)
 - create local users (see the list above for the users we'll make)
 - create a local group (nixbld)
 - install Nix in to /nix
 - create a configuration file in /etc/nix
 - set up the "default profile" by creating some Nix-related files in
   /root
 - back up /etc/bash.bashrc to /etc/bash.bashrc.backup-before-nix
 - update /etc/bash.bashrc to include some Nix configuration
 - load and start a service (at /etc/systemd/system/nix-daemon.service
   and /etc/systemd/system/nix-daemon.socket) for nix-daemon

Ready to continue?
[y/n] y


---- let's talk about sudo -----------------------------------------------------
This script is going to call sudo a lot. Every time we do, it'll
output exactly what it'll do, and why.

Just like this:

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo echo

to demonstrate how our sudo prompts look


This might look scary, but everything can be undone by running just a
few commands. We used to ask you to confirm each time sudo ran, but it
was too many times. Instead, I'll just ask you this one time:

Can we use sudo?
[y/n] y

Yay! Thanks! Let's get going!

---- Nix config report ---------------------------------------------------------
        Temp Dir:	/tmp/tmp.X54DjPIDoq
        Nix Root:	/nix
     Build Users:	32
  Build Group ID:	30000
Build Group Name:	nixbld

build users:
    Username:	UID
     nixbld1:	30001
     nixbld2:	30002
     nixbld3:	30003
     nixbld4:	30004
     nixbld5:	30005
     nixbld6:	30006
     nixbld7:	30007
     nixbld8:	30008
     nixbld9:	30009
     nixbld10:	30010
     nixbld11:	30011
     nixbld12:	30012
     nixbld13:	30013
     nixbld14:	30014
     nixbld15:	30015
     nixbld16:	30016
     nixbld17:	30017
     nixbld18:	30018
     nixbld19:	30019
     nixbld20:	30020
     nixbld21:	30021
     nixbld22:	30022
     nixbld23:	30023
     nixbld24:	30024
     nixbld25:	30025
     nixbld26:	30026
     nixbld27:	30027
     nixbld28:	30028
     nixbld29:	30029
     nixbld30:	30030
     nixbld31:	30031
     nixbld32:	30032

Ready to continue?
[y/n] y


~~> Setting up the build group nixbld

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo groupadd -g 30000 --system nixbld

Create the Nix build group, nixbld

[sudo] password for pedro: 
            Created:	Yes

~~> Setting up the build user nixbld1

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 1 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30001 --password ! nixbld1

Creating the Nix build user, nixbld1

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 1 nixbld1

in order to give nixbld1 a useful comment

usermod: no changes
              Note:	Nix build user 1
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld2

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 2 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30002 --password ! nixbld2

Creating the Nix build user, nixbld2

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 2 nixbld2

in order to give nixbld2 a useful comment

usermod: no changes
              Note:	Nix build user 2
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld3

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 3 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30003 --password ! nixbld3

Creating the Nix build user, nixbld3

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 3 nixbld3

in order to give nixbld3 a useful comment

usermod: no changes
              Note:	Nix build user 3
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld4

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 4 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30004 --password ! nixbld4

Creating the Nix build user, nixbld4

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 4 nixbld4

in order to give nixbld4 a useful comment

usermod: no changes
              Note:	Nix build user 4
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld5

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 5 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30005 --password ! nixbld5

Creating the Nix build user, nixbld5

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 5 nixbld5

in order to give nixbld5 a useful comment

usermod: no changes
              Note:	Nix build user 5
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld6

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 6 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30006 --password ! nixbld6

Creating the Nix build user, nixbld6

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 6 nixbld6

in order to give nixbld6 a useful comment

usermod: no changes
              Note:	Nix build user 6
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld7

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 7 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30007 --password ! nixbld7

Creating the Nix build user, nixbld7

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 7 nixbld7

in order to give nixbld7 a useful comment

usermod: no changes
              Note:	Nix build user 7
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld8

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 8 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30008 --password ! nixbld8

Creating the Nix build user, nixbld8

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 8 nixbld8

in order to give nixbld8 a useful comment

usermod: no changes
              Note:	Nix build user 8
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld9

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 9 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30009 --password ! nixbld9

Creating the Nix build user, nixbld9

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 9 nixbld9

in order to give nixbld9 a useful comment

usermod: no changes
              Note:	Nix build user 9
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld10

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 10 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30010 --password ! nixbld10

Creating the Nix build user, nixbld10

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 10 nixbld10

in order to give nixbld10 a useful comment

usermod: no changes
              Note:	Nix build user 10
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld11

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 11 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30011 --password ! nixbld11

Creating the Nix build user, nixbld11

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 11 nixbld11

in order to give nixbld11 a useful comment

usermod: no changes
              Note:	Nix build user 11
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld12

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 12 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30012 --password ! nixbld12

Creating the Nix build user, nixbld12

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 12 nixbld12

in order to give nixbld12 a useful comment

usermod: no changes
              Note:	Nix build user 12
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld13

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 13 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30013 --password ! nixbld13

Creating the Nix build user, nixbld13

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 13 nixbld13

in order to give nixbld13 a useful comment

usermod: no changes
              Note:	Nix build user 13
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld14

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 14 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30014 --password ! nixbld14

Creating the Nix build user, nixbld14

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 14 nixbld14

in order to give nixbld14 a useful comment

usermod: no changes
              Note:	Nix build user 14
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld15

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 15 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30015 --password ! nixbld15

Creating the Nix build user, nixbld15

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 15 nixbld15

in order to give nixbld15 a useful comment

usermod: no changes
              Note:	Nix build user 15
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld16

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 16 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30016 --password ! nixbld16

Creating the Nix build user, nixbld16

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 16 nixbld16

in order to give nixbld16 a useful comment

usermod: no changes
              Note:	Nix build user 16
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld17

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 17 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30017 --password ! nixbld17

Creating the Nix build user, nixbld17

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 17 nixbld17

in order to give nixbld17 a useful comment

usermod: no changes
              Note:	Nix build user 17
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld18

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 18 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30018 --password ! nixbld18

Creating the Nix build user, nixbld18

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 18 nixbld18

in order to give nixbld18 a useful comment

usermod: no changes
              Note:	Nix build user 18
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld19

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 19 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30019 --password ! nixbld19

Creating the Nix build user, nixbld19

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 19 nixbld19

in order to give nixbld19 a useful comment

usermod: no changes
              Note:	Nix build user 19
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld20

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 20 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30020 --password ! nixbld20

Creating the Nix build user, nixbld20

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 20 nixbld20

in order to give nixbld20 a useful comment

usermod: no changes
              Note:	Nix build user 20
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld21

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 21 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30021 --password ! nixbld21

Creating the Nix build user, nixbld21

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 21 nixbld21

in order to give nixbld21 a useful comment

usermod: no changes
              Note:	Nix build user 21
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld22

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 22 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30022 --password ! nixbld22

Creating the Nix build user, nixbld22

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 22 nixbld22

in order to give nixbld22 a useful comment

usermod: no changes
              Note:	Nix build user 22
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld23

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 23 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30023 --password ! nixbld23

Creating the Nix build user, nixbld23

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 23 nixbld23

in order to give nixbld23 a useful comment

usermod: no changes
              Note:	Nix build user 23
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld24

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 24 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30024 --password ! nixbld24

Creating the Nix build user, nixbld24

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 24 nixbld24

in order to give nixbld24 a useful comment

usermod: no changes
              Note:	Nix build user 24
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld25

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 25 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30025 --password ! nixbld25

Creating the Nix build user, nixbld25

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 25 nixbld25

in order to give nixbld25 a useful comment

usermod: no changes
              Note:	Nix build user 25
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld26

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 26 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30026 --password ! nixbld26

Creating the Nix build user, nixbld26

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 26 nixbld26

in order to give nixbld26 a useful comment

usermod: no changes
              Note:	Nix build user 26
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld27

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 27 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30027 --password ! nixbld27

Creating the Nix build user, nixbld27

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 27 nixbld27

in order to give nixbld27 a useful comment

usermod: no changes
              Note:	Nix build user 27
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld28

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 28 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30028 --password ! nixbld28

Creating the Nix build user, nixbld28

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 28 nixbld28

in order to give nixbld28 a useful comment

usermod: no changes
              Note:	Nix build user 28
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld29

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 29 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30029 --password ! nixbld29

Creating the Nix build user, nixbld29

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 29 nixbld29

in order to give nixbld29 a useful comment

usermod: no changes
              Note:	Nix build user 29
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld30

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 30 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30030 --password ! nixbld30

Creating the Nix build user, nixbld30

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 30 nixbld30

in order to give nixbld30 a useful comment

usermod: no changes
              Note:	Nix build user 30
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld31

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 31 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30031 --password ! nixbld31

Creating the Nix build user, nixbld31

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 31 nixbld31

in order to give nixbld31 a useful comment

usermod: no changes
              Note:	Nix build user 31
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld32

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 32 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30032 --password ! nixbld32

Creating the Nix build user, nixbld32

           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 32 nixbld32

in order to give nixbld32 a useful comment

usermod: no changes
              Note:	Nix build user 32
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the basic directory structure

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo /bin/chown -R root:nixbld /nix

to take root ownership of existing Nix store files


---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo install -dv -m 0755 /nix /nix/var /nix/var/log /nix/var/log/nix /nix/var/log/nix/drvs /nix/var/nix /nix/var/nix/db /nix/var/nix/gcroots /nix/var/nix/profiles /nix/var/nix/temproots /nix/var/nix/userpool /nix/var/nix/gcroots/per-user /nix/var/nix/profiles/per-user

to make the basic directory structure of Nix (part 1)

install: creating directory '/nix/var/nix/userpool'

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo install -dv -g nixbld -m 1775 /nix/store

to make the basic directory structure of Nix (part 2)


---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo install -dv -m 0555 /etc/nix

to place the default nix daemon configuration (part 1)

install: creating directory '/etc/nix'

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo install -m 0664 /tmp/tmp.X54DjPIDoq/.nix-channels /root/.nix-channels

to set up the default system channel (part 1)


~~> Installing Nix

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo cp -RLp ./store/10jzrky6qp59qm75zwxxjysyzphywznj-openssl-1.1.1l-bin ./store/1c1r48qa0m23vr9jy8sm0dc04vv14dak-coreutils-8.32 ./store/1kw32h97j6bbqcb2kl2nnaw57xnwyvcb-zstd-1.4.9 ./store/21iicqw6ib82qa1f1gfgppijz7sck8xj-aws-c-io-0.9.1 ./store/23wq9xncqncvxyddqpcb57f1qkgywdrr-aws-c-event-stream-0.2.7 ./store/433q5vd1ag3lg6chrm7pkqc78536l7pr-sqlite-3.35.5 ./store/4frnjf7jr2cc5k5wfqjapvszanmc8nq9-openssl-1.1.1l ./store/50msfhkz5wbyk8i78pjv3y9lxdrp7dlm-gcc-10.3.0-lib ./store/5d821pjgzb90lw4zbg6xwxs7llm335wr-libunistring-0.9.10 ./store/5p4jga61v4mg9pdrglj2hj76y5rbz02k-busybox-static-x86_64-unknown-linux-musl-1.32.1 ./store/5q2fwg0hhaw6n9j50snd6bn7r5rqr8y9-attr-2.4.48 ./store/5r0a92rsppim1dljzr0rhpxwdsmnab9l-libssh2-1.9.0 ./store/7lv2ahpd0x6zknyalr55mar2il2a3v0k-libsodium-1.0.18 ./store/7v7acyh2s8z2sajc1sijjs7a0svlwbyx-brotli-1.0.9-lib ./store/9pxjmchn68d0l78pcq3r54xdgaxpl83j-s2n-tls-1.0.0 ./store/ckb0qa2yrxrpp0piffgjq9id38gc5z9v-libidn2-2.3.1 ./store/dp18s34dnzbllx16cyb2pwz0fm19nbnf-bzip2-1.0.6.0.2 ./store/ds491f6b5pdk3xxnc2w103asyz1y4cfc-zlib-1.2.11 ./store/dvcalma5h3wd8bbwhj7g9m3yswxm707c-nss-cacert-3.66 ./store/fvb3znd0x7ijk0bqg3m1rndbzpspamrg-keyutils-1.6.3-lib ./store/hapw7q1fkjxvprnkcgw9ppczavg4daj2-nix-2.4 ./store/hh5ai1v2hhizkv5n4fr4hg72l1a5z1iw-curl-7.76.1 ./store/hi3dzzq1i54cpv259srcr99vh6lc4a65-openssl-1.1.1l-dev ./store/iz2jmn57crmp45y19bsj73bckj331jkq-xz-5.2.5 ./store/jbrdvdbanx81n7h4ij53mnb6v5qrc4h7-aws-checksums-0.1.11 ./store/jsfa5dnrrp1cl7yxkq8smgygg9fysgvk-aws-sdk-cpp-1.8.121 ./store/jsp3h3wpzc842j0rz61m5ly71ak6qgdn-glibc-2.32-54 ./store/l3hn1rpl7m5x45x1733x4n6wgdmn9pz0-editline-1.17.1 ./store/l4vm4han6vnnijhb6icmybbskq73ymj0-libxml2-2.9.12 ./store/lbc8s09msihzfrdfbsb7m3660hs05igp-libkrb5-1.18 ./store/mrv4y369nw6hg4pw8d9p9bfdxj9pjw0x-acl-2.3.0 ./store/n5vm0iv9jsxl0jbh8wh9l0sy8lb55z01-libarchive-3.5.2-lib ./store/n9va4cqy8r026jcjkxbnzhqbd33kl3nm-nghttp2-1.43.0-lib ./store/rsf0p5xifn2n5smg5v3l1sz75sv0maz2-libcpuid-0.5.1 ./store/vaal5xhgdn20qgjj58p9kdnqam8ppn6y-perl-5.32.1 ./store/w2wh0vxwk48fcdli04a38b4inbrj2qpz-aws-c-cal-0.4.5 ./store/wdja1fn6ldqzfy7ra9f072q34249dnd5-libseccomp-2.5.1-lib ./store/wv35g5lff84rray15zlzarcqi9fxzz84-bash-4.4-p23 ./store/yicaw4ql8dz3bvrpw1swxn3xwvr0afk3-aws-c-common-0.5.5 ./store/zr1jbxmlh4065a0njbhf471rk1xp9hxg-boehm-gc-8.0.4 /nix/store/

to copy the basic Nix files to the new store at /nix/store

cp: cannot overwrite non-directory '/nix/store/50msfhkz5wbyk8i78pjv3y9lxdrp7dlm-gcc-10.3.0-lib/lib64' with directory './store/50msfhkz5wbyk8i78pjv3y9lxdrp7dlm-gcc-10.3.0-lib/lib64'
cp: cannot overwrite non-directory '/nix/store/jsp3h3wpzc842j0rz61m5ly71ak6qgdn-glibc-2.32-54/lib64' with directory './store/jsp3h3wpzc842j0rz61m5ly71ak6qgdn-glibc-2.32-54/lib64'
cp: cannot overwrite non-directory '/nix/store/lbc8s09msihzfrdfbsb7m3660hs05igp-libkrb5-1.18/sbin' with directory './store/lbc8s09msihzfrdfbsb7m3660hs05igp-libkrb5-1.18/sbin'

---- oh no! --------------------------------------------------------------------
Jeeze, something went wrong. If you can take all the output and open
an issue, we'd love to fix the problem so nobody else has this issue.

:(

We'd love to help if you need it.

You can open an issue at https://github.com/nixos/nix/issues

Or feel free to contact the team:
 - Matrix: #nix:nixos.org
 - IRC: in #nixos on irc.libera.chat
 - twitter: @nixos_org
 - forum: https://discourse.nixos.org
pedro ~ $ 
@fgibbes
Copy link

fgibbes commented Nov 21, 2021

I got the exact same issue on Ubuntu 20.04.3 LTS

Additional info. When I try to run I get:
~$ nix-shell
error: could not set permissions on '/nix/var/nix/profiles/per-user' to 755: Operation not permitted

@fgibbes
Copy link

fgibbes commented Nov 21, 2021

I managed to install using the instructions in this link!
https://ariya.io/2020/05/nix-package-manager-on-ubuntu-or-debian

@scotho3
Copy link

scotho3 commented Nov 24, 2021

I ran in to the exact same issue trying to go to a multi-user install after I had already installed it in a single user, removing /nix fixed my issue.

sudo rm -rf /nix/

and then rerun the installer:

sh <(curl -L https://nixos.org/nix/install) --daemon

@peterbecich
Copy link
Contributor

I also see this issue when attempting to upgrade single-user Nix 1.5 to multi-user Nix 1.6:


cp: cannot overwrite non-directory '/nix/store/50msfhkz5wbyk8i78pjv3y9lxdrp7dlm-gcc-10.3.0-lib/lib64' with directory './store/50msfhkz5wbyk8i78pjv3y9lxdrp7dlm-gcc-10.3.0-lib/lib64'
cp: cannot overwrite non-directory '/nix/store/jsp3h3wpzc842j0rz61m5ly71ak6qgdn-glibc-2.32-54/lib64' with directory './store/jsp3h3wpzc842j0rz61m5ly71ak6qgdn-glibc-2.32-54/lib64'
cp: cannot overwrite non-directory '/nix/store/lbc8s09msihzfrdfbsb7m3660hs05igp-libkrb5-1.18/sbin' with directory './store/lbc8s09msihzfrdfbsb7m3660hs05igp-libkrb5-1.18/sbin'

On Debian

@kafji
Copy link

kafji commented Mar 23, 2022

I had the same issue when reinstalling Nix from single-user to multi-user.

ow-its's solution solved the issue for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants