{{Header}} {{Title| title=command-not-found - suggest installation of missing software packages in terminal }} {{#seo: |description=HowTo: install command-not-found |image=Notfound14123523.png }} [[File:Notfound14123523.png|thumb|250px]] {{intro| HowTo: install command-not-found }} = Introduction = Quote Debian package [https://packages.debian.org/{{Stable project version based on Debian codename}}/command-not-found command-not-found]:
Suggest installation of packages in interactive bash sessions This package will install a handler for command_not_found that looks up programs not currently installed but available from the repositories.
= Installation = The order in which these commands are run matter, Also apt update cannot be skipped since package contents files need to be downloaded. but the process is idempotent. This means it is possible to re-apply all of the following steps. {{Box|text= '''1.''' Delete [https://github.com/{{project_name_short}}/usability-misc/blob/master/etc/apt/apt.conf.d/30usability-misc /etc/apt/apt.conf.d/30usability-misc] because it contains settings that [https://forums.whonix.org/t/speeding-up-apt-update-with-acquire-languages-none-and-contents-deb-defaultenabled-false-its-so-much-faster/8894 speed up APT] but break command-not-found.
Acquire::IndexTargets::deb::Contents-deb::DefaultEnabled false;
breaks command-not-found because it requires /var/lib/apt/lists/*Contents* to exist. See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857090
{{CodeSelect|code= sudo rm -f /etc/apt/apt.conf.d/30usability-misc }} '''2.''' Install command-not-found. {{Install Package| package=command-not-found }} '''3.''' Run update-command-not-found with root rights. {{CodeSelect|code= sudo update-command-not-found }} '''4.''' Done. Setup of update-command-not-found has been completed. }} = Issues = == local variable 'cnf' referenced before assignment == * https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=917455 * https://salsa.debian.org/jak/command-not-found/-/merge_requests/1 = See Also = * [[apt-file|apt-file]] * [https://forums.whonix.org/t/command-not-found-warningcould-not-open-file-etc-apt-sources-list/7903 command-not-found - WARNING:root:could not open file '/etc/apt/sources.list'] * [https://forums.whonix.org/t/speeding-up-apt-update-with-acquire-languages-none-and-contents-deb-defaultenabled-false-its-so-much-faster/8894 Speeding up "apt update" with Acquire::Languages=none and Contents-deb::DefaultEnabled=false - It's so much faster!] = Footnotes = {{reflist|close=1}} [[Category:Documentation]] {{Footer}}