我在不稳定的nix频道:
# nix-channel --list
nixos https://nixos.org/channels/nixos-unstable
# nix-channel --update
downloading Nix expressions from ‘https://nixos.org/releases/nixos/unstable/nixos-16.09pre78848.9549257//nixexprs.tar.xz’...
downloading ‘https://nixos.org/releases/nixos/unstable/nixos-16.09pre78848.9549257//nixexprs.tar.xz’... [ [6192/6921 KiB, 6143.1 KiB/s]
unpacking channels...由于某些原因,command-not-found无法工作:
$ command-not-found
/home/fabian command-not-found
DBI connect('dbname=/nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite','',...) failed: unable to open database file at /run/current-system/sw/bin/command-not-found line 13.
cannot open database `/nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite' at /run/current-system/sw/bin/command-not-found line 13.事实上,/nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite并不存在。这是什么原因?
发布于 2017-09-19 14:30:29
FWIW,nixos-install似乎没有正确地生成programs.sqlite。
我看到了同样的错误,在一个新的17.03安装,即使它是工作在其他系统,我有,也是17.03。
手动运行nix-channel --update是为我修复它所需要的全部。(我没有运行nixos-rebuild或任何可能更改command-not-found版本的操作。)
https://stackoverflow.com/questions/36153603
复制相似问题