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

Nix installation fails on macOS (High) Sierra #1582

Closed
ebzzry opened this issue Sep 27, 2017 · 6 comments
Closed

Nix installation fails on macOS (High) Sierra #1582

ebzzry opened this issue Sep 27, 2017 · 6 comments
Assignees

Comments

@ebzzry
Copy link

ebzzry commented Sep 27, 2017

This is the output from

curl -o install-nix https://nixos.org/nix/install
sh install-nix

downloading Nix 1.11.15 binary tarball for x86_64-darwin from 'https://nixos.org/releases/nix/nix-1.11.15/nix-1.11.15-x86_64-darwin.tar.bz2' to '/var/folders/9s/l0ks1r093p786j3nkp5dzv080000gp/T/nix-binary-tarball-unpack.XXXXXXXXXX.7N45JFOM'...
Switching to the Multi-User Darwin 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 one.

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]

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
   /var/root
 - back up /etc/profile to /etc/profile.backup-before-nix
 - update /etc/profile to include some Nix configuration
 - back up /etc/bashrc to /etc/bashrc.backup-before-nix
 - update /etc/bashrc to include some Nix configuration
 - back up /etc/zshrc to /etc/zshrc.backup-before-nix
 - update /etc/zshrc to include some Nix configuration
 - load and start a LaunchDaemon (at /Library/LaunchDaemons/org.nixos.nix-daemon.plist) for nix-daemon

Ready to continue?
[y/n]

---- 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]
Yay! Thanks! Let's get going!

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

    $ sudo test -e /var/root/.nix-defexpr

making sure that /var/root/.nix-defexpr doesn't exist


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

    $ sudo test -e /var/root/.nix-channels

making sure that /var/root/.nix-channels doesn't exist


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

    $ sudo test -e /var/root/.nix-profile

making sure that /var/root/.nix-profile doesn't exist


---- hardware report -----------------------------------------------------------
           Cores:	4

---- Nix config report ---------------------------------------------------------
        Temp Dir:	/var/folders/9s/l0ks1r093p786j3nkp5dzv080000gp/T/tmp.XXXXXXXXXX.ViYGnxpW
        Nix Root:	/nix
     Build Users:	4
  Build Group ID:	30000
Build Group Name:	nixbld

build users:
    Username:	UID
     nixbld1:	30001
     nixbld2:	30002
     nixbld3:	30003
     nixbld4:	30004

Ready to continue?
[y/n]

~~> Setting up the build group nixbld
            Exists:	Yes

~~> Setting up the build user nixbld1
            Exists:	Yes
          IsHidden:	Yes
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld2
            Exists:	Yes
          IsHidden:	Yes
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld3
            Exists:	Yes
          IsHidden:	Yes
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld4
            Exists:	Yes
          IsHidden:	Yes
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

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

    $ sudo mkdir -pv -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

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


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

    $ sudo mkdir -pv -m 1777 /nix/var/nix/gcroots/per-user /nix/var/nix/profiles/per-user

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


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

    $ sudo mkdir -pv -m 1775 /nix/store

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


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

    $ sudo chgrp nixbld /nix/store

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


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

    $ sudo mkdir -pv -m 0755 /nix/var/nix/profiles/per-user/root

to set up the root user's profile (part 1)


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

    $ sudo mkdir -pv -m 0700 /var/root/.nix-defexpr

to set up the root user's profile (part 2)


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

    $ sudo mkdir -pv -m 0555 /etc/nix

to place the default nix daemon configuration (part 1)


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

    $ sudo install -m 0664 /var/folders/9s/l0ks1r093p786j3nkp5dzv080000gp/T/tmp.XXXXXXXXXX.ViYGnxpW/.nix-channels /var/root/.nix-channels

to set up the default system channel (part 1)


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

    $ sudo rsync -rlpt /var/folders/9s/l0ks1r093p786j3nkp5dzv080000gp/T/nix-binary-tarball-unpack.XXXXXXXXXX.7N45JFOM/unpack/nix-1.11.15-x86_64-darwin/store/ /nix/store/

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


---- oh no! --------------------------------------------------------------------
Something went wrong, and I didn't find Nix installed at
/nix/store/dgwz3dxdzs2wwd7pg7cdhvl8rv0qpnbj-nix-1.11.15.

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

---- 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.

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
@robinbb
Copy link

robinbb commented Oct 5, 2017

👍

@grahamc
Copy link
Member

grahamc commented Nov 26, 2017

I've been trying to reproduce this, but I'm not having any luck. What version, exactly, of HS do you have? Hopefully with the next patch of HS plus #1700 will fix this.

@giorgiga
Copy link
Contributor

I have the same issue on macOS 10.13.2 (17C205) (ie: the latest version) and nix 1.11.16

@giorgiga
Copy link
Contributor

I have been able to determine that the issue is caused by me having umask 0027 in my .bashrc (or, rather, by the install script not working with such umasks).

See PR for a fix.

edolstra added a commit that referenced this issue Jan 31, 2018
Fix macOS installation when umask disallow public read (solves #1582)
@shlevy shlevy added the backlog label Apr 1, 2018
@jcrben
Copy link

jcrben commented Jul 21, 2018

@vcunat seems like this could probably be closed since the reporter made a PR to fix? NixOS/nixpkgs#39115 might fit better here than at nixpkgs, but it's specifically caused by administrative software such as JAMF

@vcunat
Copy link
Member

vcunat commented Jul 21, 2018

The PR claiming to fix this (#1825) is merged and released, so I'll assume this is fixed.

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

No branches or pull requests

7 participants