NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
11.55k stars 1.45k forks source link

Nix install with curl fails if /nix already exists #3309

Open trusktr opened 4 years ago

trusktr commented 4 years ago

Basically the details are here: https://discourse.nixos.org/t/nix-install-with-curl-fails-if-nix-already-exists/5363

TLDR: when running curl https://nixos.org/nix/install | sh a second time, it does not ask for sudo, and then it fails on manipulating anything in the root file system (which requires sudo).

As a workaround, one can first delete the existing root files manually, then run curl https://nixos.org/nix/install | sh again.

nixos-discourse commented 4 years ago

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nix-install-with-curl-fails-if-nix-already-exists/5363/4

LnL7 commented 4 years ago

A standard install ie. without --daemon is owned by a single (non root) user. Which means running the installer a second time should not need sudo at all. Can you describe more about the state of the existing installation when you run into this?

stale[bot] commented 3 years ago

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