Open Marietto2008 opened 3 years ago
As stated in the manual about single-user installations (which are done by default):
This will perform a single-user installation of Nix, meaning that
/nix
is owned by the invoking user. You should run this under your usual user account, not as root.
I'd remove /nix
and try the install again, this time without using sudo
.
I marked this as stale due to inactivity. → More info
I stumbled upon the same issue on Ubuntu 20.04 after installing Nix 2.8.1:
setser@machine:~$ nix doctor
error: could not set permissions on '/nix/var/nix/profiles/per-user' to 755: Operation not permitted
The permissions for this directory are already correct:
setser@jakku:~$ ls -la /nix/var/nix/profiles/
total 16
drwxr-xr-x 3 root root 4096 May 16 20:09 .
drwxr-xr-x 8 root root 4096 May 16 20:09 ..
lrwxrwxrwx 1 root root 14 May 16 20:09 default -> default-1-link
lrwxrwxrwx 1 root root 60 May 16 20:09 default-1-link -> /nix/store/jablffvlwqn3c1mnry4hpq5pnm4cz8mk-user-environment
drwxr-xr-x 3 root root 4096 May 16 20:09 per-user
Removing nix
and reinstalling does not help.
Removing nix
as described in manual and reinstalling helped, seems like something remained from previous nix installation.
I think it needs windows administrator access,
Right click on start then select power shell(admin)
wsl
in admin powershellnix-shell
Removing
nix
as described in manual and reinstalling helped, seems like something remained from previous nix installation.
Which manual page do you mean?
On ubuntu 21.04,I tried to install nix with this command :
but I've got this error :
error: could not set permissions on '/nix/var/nix/profiles/per-user' to 755: Operation not permitted
I think that u already know that I can't install it as root.