Help installing the "command-not-found" package

Guys, when using Ubuntu, there was a package that suggested to install a program that is not installed similar to the package that was about to be installed, in case you did not find the package you typed. Example: I suppose you want to install the “htop” package but I made a mistake …
$ sudo pacman -Syu htol | In that case, he would give a message saying “Command ‘htol’ not found, but you can install htop”.
In other cases it suggests installing a package that has not yet been installed, but which is in the repository.

pkgfile includes a “command not found” hook that will automatically search the official repositories, when entering an unrecognized command. You need to source the hook to enable it, for example:

source /usr/share/doc/pkgfile/command-not-found.bash

Then attempting to run an unavailable command will show the following info:

$ abiword

abiword may be found in the following packages:
  extra/abiword 3.0.1-2	/usr/bin/abiword

An alternative “command not found” hook is provided by command-not-found (AUR), which looks like this:

$ abiword
The command 'abiword' is provided by the following packages: 
  abiword (2.8.6-7) from extra [ abiword ] 
  abiword (2.8.6-7) from staging [ abiword ] 
  abiword (2.8.6-7) from testing [ abiword ]


Manjaro-zsh-config already includes pkgfile. It is default in gnome edition

I’m newbie in this stuffs. But thanks for the information.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.