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

Unable to install Nix #5468

Closed
bradley-heather opened this issue Nov 2, 2021 · 8 comments · Fixed by #5489
Closed

Unable to install Nix #5468

bradley-heather opened this issue Nov 2, 2021 · 8 comments · Fixed by #5489
Labels
bug macos Nix on macOS, aka OS X, aka darwin

Comments

@bradley-heather
Copy link

Describe the bug
Unable to install Nix on MacOS Catalina

Terminal Output

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

$ sudo /usr/bin/ex /etc/synthetic.conf

to add Nix to /etc/synthetic.conf

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

:(

What should my next step be? Thanks!!

@abathur
Copy link
Member

abathur commented Nov 3, 2021

There's likely something unexpected about your environment, but it may take a few rounds of picking at it...

  • Is this a first-time install, or a reinstall?
  • Normal mac hardware? VM?
  • Do you already have an /etc/synthetic.conf? if so, what's in it, and what does ls -la /etc/synthetic.conf say?
  • What was the install command?

@domenkozar domenkozar added the macos Nix on macOS, aka OS X, aka darwin label Nov 3, 2021
@bradley-heather
Copy link
Author

Thanks for getting back to me!

  • its a reinstall
  • normal mac hardware
  • i did have a /etc/synthetic.conf. It only had nix in it. I removed it and tried again and it still didn't work.
  • I tried installing with Daemon and without. Using the curl -L https://nixos.org/nix/install | sh command.

@abathur
Copy link
Member

abathur commented Nov 3, 2021

It may be easier to iterate on this in real-time, if you can join the macOS room on the NixOS Matrix.

In either case, running the command that fails directly may help clarify what's going on (ideally in bash):

/usr/bin/sudo /usr/bin/ex /etc/synthetic.conf <<EOF
:a
nix
.
:x
EOF

@bradley-heather
Copy link
Author

Thanks, I've joined the room.

It seems that that is not where the failure lies as I can run that command and it executes fine.

@abathur
Copy link
Member

abathur commented Nov 4, 2021

After quite the slog today, we finally shook the problem loose:

Something in the vim startup/plugin files on this system causes /usr/bin/ex (which the installer uses to edit a few files) to quietly exit with an error code, despite successfully editing the file.

The error code halts the installer, but the correctly-edited file sends us off on a goose-chase for problems between this line and the next printing statement. I'll address in a PR soon.

@borkdude
Copy link

I had exactly the same problem.

@soulomoon
Copy link

soulomoon commented Nov 26, 2021

I have the same problem, have a clean vim configuration and temporally rename ~/.vim/plugin to anything helps in my situation.

@jj0b
Copy link

jj0b commented Dec 12, 2021

I also ran into this, and I got around it by temporarily renaming my ~/.vim directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug macos Nix on macOS, aka OS X, aka darwin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants