Skip to main content
2 of 2
added 484 characters in body
Liz
  • 153
  • 1
  • 7

Is `command-not-found` broken?

There's a really great package that I love called command-not-found. When you type unknown commands, it searches through apt and suggests packages to install. It has worked in Raspberry Pi before.

However if you try it now…

sudo apt-get install command-not-found

Package is installed. According to docs you need to generate its database:

sudo update-command-not-found

It however finishes under half a second with return code 0, which is suspicious and strange. I've used it before in a full PC and it takes at least 20 seconds.

Then, no matter how many times I try to update-command-not-found, or restart my bash session, the database is never there.

$ aoeuaoeuaoeu
Could not find the database of available applications, run update-command-not-found as root to fix this
aoeuaoeuaoeu: command not found

If you man update-command-not-found, it references the file/folder (I dunno) /var/cache/apt/apt-file, which doesn't seem to be there at all. Should it? Or should update-command-not-found look elsewhere?

Liz
  • 153
  • 1
  • 7