NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
12.7k stars 1.51k forks source link

error: imported archive of ‘/nix/store/*-nixexprs.tar.xz’ lacks a signature #1860

Open coretemp opened 6 years ago

coretemp commented 6 years ago

On the mailinglist, I saw someone use this command, but it fails for me:

nix run -f channel:nixos-17.09 gcc5
[9.7 MiB DL]
error: imported archive of ‘/nix/store/2hgx1y93mhiay5knisb6ibdrd4d37gg8-nixexprs.tar.xz’ lacks a signature

The error is also not actionable. Where do I get said signature? Please link to documentation in the output.

matthewbauer commented 6 years ago

This happens to me when the running 'nix-daemon' is still on 1.11 but your local user is on 2.0.

Try running this to get your daemon version:

sudo su root -c 'nix-daemon --version'

If it's on 2.0pre5889_c287d731 and you still get this error try restarting your nix-daemon service (or just restarting the computer).

That said, Nix should have a better way of handling this especially with lots of people upgrade from Nix 1.11 to Nix 2.0. Maybe the "nix" CLI should check the nix-daemon version before running?

/cc @edolstra

coretemp commented 6 years ago

Nix CLI should definitely check the nix-daemon version and link to documentation explaining what to do including a discussion of whether it's actually advisable to upgrade the daemon (probably not).

matthewbauer commented 6 years ago

It looks like it does - it's just not been updated recently:

https://github.com/NixOS/nix/blob/c129fc6ee8a8bf6de633dc1b91869a0c428ca75c/src/libstore/remote-store.cc#L146-L147

puffnfresh commented 6 years ago

Just hit this, what is the protocol version now?

matthewbauer commented 6 years ago

@puffnfresh It's set at 0x114 right now. I wonder if just bumping this will fix it.

copumpkin commented 6 years ago

Well, we kind of don't want it to just break (because we want people to be testing Nix 2.0 right now and multi-user systems are the default on macOS), right? They are mostly compatible, but break here. The usual version check seems too pessimistic.

matthewbauer commented 6 years ago

It's fine to not bump it now- I just think it should be bumped before 2.0 is released. Otherwise people on multi-user setups will have issues when updating.

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info