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

Install on MacOS High Sierra fails after interrupting first install #2233

Open
pboyer opened this issue Jun 16, 2018 · 4 comments
Open

Install on MacOS High Sierra fails after interrupting first install #2233

pboyer opened this issue Jun 16, 2018 · 4 comments
Labels
macos Nix on macOS, aka OS X, aka darwin stale

Comments

@pboyer
Copy link

pboyer commented Jun 16, 2018

On my first install of nix, I interrupted it as it seemed to be busy establishing what turned out to be 32 "build users". This has left the system in a permanently broken state.

I presently get this error when trying to install nix.

It seems the build user nixbld25 already exists, but with the UID
with the UID ''. This script can't really handle that right
now, so I'm going to give up.

If you already created the users and you know they start from
 and go up from there, you can edit this script and change
NIX_FIRST_BUILD_UID near the top of the file to  and try
again.

We'd love to help if you need it.

If you can, open an issue at https://github.com/nixos/nix/issues

Or feel free to contact the team,
 - on IRC #nixos on irc.freenode.net
 - on twitter @nixos_org

There is no directory /nix. /var/empty is empty. There is no ~/.nix_profile directory. I really don't understand where the residual state for this install is, but I can't clean it up.

@pboyer pboyer changed the title Install on MacOS High Sierra fails Install on MacOS High Sierra fails after interrupting first install Jun 16, 2018
@pboyer
Copy link
Author

pboyer commented Jun 16, 2018

Fixed. I found and deleted a number of files like this:

/db/dslocal/nodes/Default/users/nixbld*.plist

I found the install script very confusing for more than one reason:

  1. What the heck are build users? Why are we making 32 of them?
  2. The script gives confusing or hard to follow suggestions. From the error: you can edit this script and change NIX_FIRST_BUILD_UID near the top of the file to and try again. But the suggested install process pulls what appears to be a nested doll of scripts. Which script am I supposed to edit? I appreciate the friendly tone of the error messages, but it's more important to provide pertinent, concise information than anything and these errors do not at present achieve that.
  3. The install script provides no mention of these files being created. I had to find . -name "*nix*" to find them.
  4. The install script evidently is not able to roll back from interruption. This seems like a rather fundamental issue, particularly in an install script that is touching so much of the file system.

@manveru
Copy link
Contributor

manveru commented Jul 12, 2018

Just had another guy in IRC who faced issues with NIX_FIRST_BUILD_UID, since he tried to install Nix on a machine with over 30000 users. It'd be nice if the script could use

readonly NIX_FIRST_BUILD_UID="${NIX_FIRST_BUILD_UID:-30001}"

To make configuration of this variable possible without having to unpack the whole thing and modify stuff. Can anyone point out problems with this approach? I'm not sure if this is supported by all shells...

Otherwise telling the user what the first free UID is would also be helpful

@domenkozar domenkozar added the macos Nix on macOS, aka OS X, aka darwin label Apr 30, 2020
@stale
Copy link

stale bot commented Feb 16, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Feb 16, 2021
@stale
Copy link

stale bot commented Apr 29, 2022

I closed this issue due to inactivity. → More info

@stale stale bot closed this as completed Apr 29, 2022
@thufschmitt thufschmitt reopened this Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
macos Nix on macOS, aka OS X, aka darwin stale
Projects
None yet
Development

No branches or pull requests

4 participants