Skip to main content
Tweeted twitter.com/StackRaspi/status/932691882077024256
added 484 characters in body
Source Link
Liz
  • 153
  • 1
  • 7

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…)
# 

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

sudo update-command-not-found
   (finishes in <half-second)
# echo 

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.

$?
0
# 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?

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…)
# sudo update-command-not-found
   (finishes in <half-second)
# echo $?
0
# aoeuaoeuaoeu
Could not find the database of available applications, run update-command-not-found as root to fix this
aoeuaoeuaoeu: command not found
#

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?

Source Link
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…)
# sudo update-command-not-found
   (finishes in <half-second)
# echo $?
0
# aoeuaoeuaoeu
Could not find the database of available applications, run update-command-not-found as root to fix this
aoeuaoeuaoeu: command not found
#