Open ShamrockLee opened 2 years ago
I guess there has been some confusion in the OP, since the title is about nix-store
but the command is nix-shell
(maybe I'm missing something, but nix-shell
doesn't have any --gc
option).
I actually tried with nix-store
, and here instead is the error message:
[user@host]~% nix-portable nix-store --gc
0 store paths deleted, 0.00 MiB freed
error: cannot bind to socket '/nix/var/nix/gc-socket/socket': Operation not permitted
Notice that there is no /nix
folder at all (NP_LOCATION
is also set to another folder, but otherwise the only instance would be anyhow in my home).
Same issue with the new-style command nix store gc
.
The same error occurs when running directly or inside a nix-shell environment.
When entering an arbitrary nix-shell (e.g. by
nix-portable nix-shell -p git
),readlink
works alright on theresult
links and all the symlinks under/nix/var/nix/gcroots/auto
(/nix/var/nix/gcroots/per-user/myuser
is empty). However, when tryingwhile
ls -l /nix/var/nix/gcroots
shows that/nix/var/nix/gcroots/profiles
is a bolic link to/nix/var/nix/profiles
.Platform: CentOS 7 (CERN LXPLUS)