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

Error when trying to nix-store --gc #25

Open
ShamrockLee opened this issue Jan 7, 2022 · 1 comment
Open

Error when trying to nix-store --gc #25

ShamrockLee opened this issue Jan 7, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@ShamrockLee
Copy link
Contributor

$ nix-portable nix-shell --gc`, an error
finding garbage collector roots...
0 store paths deleted, 0.00 MiB freed
reading symlink: Operation not permitted
error: --- SysError -------------- nix-store
reading symlink: Operation not permitted

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 the result links and all the symlinks under /nix/var/nix/gcroots/auto (/nix/var/nix/gcroots/per-user/myuser is empty). However, when trying

$ readlink /nix/var/nix/gcroots/profiles

$ echo $?
1

while 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)

@alecandido
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants