It happened on my self host machine when I cached some binary files with nix-serve and copied the caches in a docker container with nix:latest.
I found an issue on the problem. It said you can fix the problem by removing /nix/var/nix/binary-cache-v3.sqlite
, but the file isn’t on my server. And I run nix-build in a docker container, so the db file may be new everytime building.
I tried nix-store --delete <nix-store path for that file>
and re-build, but the problem is still existed.
I think the problem can be fixed by reset hash db, but I don’t know where it located.
Or is there other method to fix it?
Edit1:
the problem is solved by setting narinfo-cache-positive-ttl to a short time, but I don’t think this is a good way to fix it.