1
0
Fork 0
mirror of https://github.com/NixOS/nix.dev.git synced 2024-10-18 14:32:43 -04:00

Merge pull request #3 from ashgillman/patch-1

Suggestion for malformed DB that worked for me
This commit is contained in:
Domen Kožar 2016-12-07 00:15:27 +01:00 committed by GitHub
commit aede7d3f39

View file

@ -10,7 +10,15 @@ Secrets?
How do I fix: error: querying path in database: database disk image is malformed
--------------------------------------------------------------------------------
No known solution yet.
Try:
sqlite3 /nix/var/nix/db/db.sqlite "pragma integrity_check"
Which will print the errors in the database. If the errors are due to missing
references, the following may work:
mv /nix/var/nix/db/db.sqlite /nix/var/nix/db/db.sqlite-bkp
sqlite3 /nix/var/nix/db/db.sqlite-bkp ".dump" | sqlite3 /nix/var/nix/db/db.sqlite
How nix decides which parts of the environment affect a derivation and its sha256 hash