I have found that the nix installer is no longer working on Ubuntu 20.04.6 LTS, x86_64-linux. In particular, on a fresh install/VM I’m running:
curl -L https://releases.nixos.org/nix/nix-2.16.1/install > /tmp/install-nix.sh yes | sh /tmp/install-nix.sh --daemon . "/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh" nix-shell
The install proceeds without issue but I’m seeing a failure attempting to run
nix-shell, or any other
nix-* command for that matter,
cs-tze7x4cv-light-gpu-homedir-721859% nix-shell error: could not set permissions on '/nix/var/nix/profiles/per-user' to 755: Operation not permitted
The closest issue I can find is error: could not set permissions on '/nix/var/nix/profiles/per-user' to 755: Operation not permitted · Issue #3435 · NixOS/nix · GitHub, but I have not been able to get any of the workarounds presented therein to work. The issue also appears to have lost traction.
Why am I getting this error? How can I install nix?