I get this error whenever i type a command that doesn’t exist:
Baryon@serverless: btop
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-systen/su/bin/command-not-found line 13.
I’m not having issue in the pre-installed packages and software, only problem I do have is with when i write a command of a package that is not installed,
expected output:
[nyxar@nixos ~]$ clang
The program 'clang' is not in your PATH. It is provided by several packages.
You can make it available in an ephemeral shell by typing one of the following:
nix-shell -p clang
nix-shell -p clang_12
nix-shell -p clang_13
...
the output i got:
[baryon@🌐 serverless .config/fish]$ clang
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.
That is what programs.command-not-found.enable that is enabled by default does.
Checks precomputed db from root channel and outputs that “expected output”.
Assuming you do not use channels (you use flakes or something else instead) it won’t be able to find that db.
Your options:
disable it by adding programs.command-not-found.enable = false; to your config.
No I don’t use flakes, and this feature should come with the system by default, also, nix-index doesn’t work at all, once I reboot, everything related to nix-index is deleted
(i guess i should not that i’m used the minimal installer to install this nios version)
sudo nix-channel --list output is nixos https://nixos.org/channels/nixos-24.05
the other one output nothing as expected
i can install packages and all that so i know it’s working