Stdenv-linux is missing

For some reason, after running nixos-rebuild, I get

error: getting attributes of path ‘/nix/store/4y965wrv3shgg2s1ca431qpbrsb4dbag-stdenv-linux’: No such file or directory

The path does indeed not exist in /nix/store, and there is also nother directory that contains stdenv-linux.

So it seems I am missing stdenv? And how can I restore it?

take a look at Nix commands error for idea’s.

thanks, nix-store --verify solved it.

And I learned something new: the option is not mentioned in nix-store --help, only in the online manual it seems.

Things in nix land move quick, and sometimes the documentation lags behind the current, that’s not because the project doesn’t want to write documentation, it’s quick around here… In this instance, the documentation has outpaced the command line tool options! :-).

I’m glad you got back up and running!. Any idea’s what went wrong? maybe a power outage? or do you have bad ram, or a crash leaving the nix sqlite database in a degraded state?

There is a chance to fix this, commit!

1 Like

I’m not really sure how I left the database degraded, nixos thankfully runs really stable and the updates usually also work flawlessly. The only thing I can think of is interrupting the update process due long build times for R packages.

i found that interrupting nix-build operations has been pretty resilient, much more that apt/rpm , but it may be that apt hates me… or computers in general hate me, or i’m generally more lucky with nix, and unlucky with non nix systems?.. ;-).

I’m glad your system is stable, that a win! … keep an eye on it…