Open adnelson opened 8 years ago
Is your hdd drive all good?
Yes. Also this happens on multiple machines, including OSX and Centos, and on VMs.
A potential issue I see is that I'm using a non-standard nix directory (/opt/ns/nix
instead of /nix
)
@adnelson this one is really hard to debug, because I can not reproduce. Any steps to get http://sscce.org would help :)
I hit this while trying to install NixOS from rescue mode. Instructions here - except I do this on a ovh.com dedicated server (their rescue mode).
$ nixos-install
[...]
importing serialized closure /tmp/tmp.lA5cW2B0Jp/channel.closure to /mnt...
error: path '/nix/store/gy4yv67gv3j6in0lalw37j353zdmfcwm-nix-1.11.16' is not valid
#
# nix-store --verify-path /nix/store/gy4yv67gv3j6in0lalw37j353zdmfcwm-nix-1.11.16
path ‘/nix/store/gy4yv67gv3j6in0lalw37j353zdmfcwm-nix-1.11.16’ was modified! expected hash ‘0000000000000000000000000000000000000000000000000000000000000000’, got ‘6a1d3f98ebed460e04191e3f308105f5e42fa3fc9fa818145c27b0803f56fb61’
#
I'm getting this as well. I can't rebuild my system because of it :(
$ nixos-rebuild build
.
.
.
ln: failed to create symbolic link '/nix/store/hnr5cvavqcd12iiclcpqy2vvwz2pry7d-neovim-ruby-env/bin/bundle': File exists
builder for ‘/nix/store/lv4khjybbjhh4dgzbjg2xk3bgrgiw4za-neovim-ruby-env.drv’ failed with exit code 1
$ nix-store verify-path /nix/store/hnr5cvavqcd12iiclcpqy2vvwz2pry7d-neovim-ruby-env
error: path ‘/nix/store/hnr5cvavqcd12iiclcpqy2vvwz2pry7d-neovim-ruby-env’ is not valid
$ NIX_REMOTE= nix-store --repair-path /nix/store/hnr5cvavqcd12iiclcpqy2vvwz2pry7d-neovim-ruby-env
error: path ‘/nix/store/hnr5cvavqcd12iiclcpqy2vvwz2pry7d-neovim-ruby-env’ is not valid
Any ideas how I can at least fix the "file exists" error?
I have one near-sscce that has one confounding factor: Vagrant.
https://github.com/chreekat/invalid-path-test
For some reason, glibc is considered an invalid path when using export+import to copy a closure to a VM, but everything is fine if nix-copy-closure is used directly.
I ran into this when working on a system where nix-copy-closure isn't immediately available, possibly for bad reasons. That doesn't seem relevant, though -- export+import should work, I think!
I marked this as stale due to inactivity. → More info
I closed this issue due to inactivity. → More info
I think this issue persists into the very latest versions of Nix, as per https://github.com/NixOS/nix/issues/9052#issuecomment-1884841737
I've been encountering occasional errors when doing
nix-copy-closure
. The command sometimes fails, complaining that a path is not valid, and I can't seem to find why. The failures do not seem to have anything to do with SSH. For example, putting the path intonix-store --verify-path
also fails, in one of two ways. The first is an error which has no explanation:This is not helpful at all -- why is it not valid? The store objects haven't been modified in any way.
The other message is slightly more informative, but makes no sense:
This to me indicates that nix is storing hashes incorrectly. It also calls into question whether the other type of error is valid.
Unfortunately, there's no easy way to provide steps to reproduce the error, as it seems to be completely arbitrary which paths break. At the very least, there needs to be more informative error messages here.