Hi all,
… and a Happy New Year to everybody.
On my main system Lubuntu 20.04.3 LTS the “command-not-found”-package is installed by default.
So when I type e.g. kate
(this text-editor is not installed) I get
kate
Command 'kate' not found, but can be installed with:
sudo snap install kate # version 21.04.0, or
sudo apt install kate # version 4:19.12.3-0ubuntu1
See 'snap info kate' for additional versions.
This behaviour (which I like) seems to be triggered by the “command-not-found” package which is installed on Lubuntu:
dpkg -l | grep command-not
ii command-not-found 20.04.5 all Suggest installation of packages in interactive bash sessions
ii python3-commandnotfound 20.04.5 all Python 3 bindings for command-not-found.
So far so good.
I also run Debian (Debian GNU/Linux 10 (buster)) in a VM and here the respective package is not installed. So I installed it manually.
Now that I have it available on Debian I tried it by typing kate
(which isn´t installed here either) and I got the following:
kate
Could not find the database of available applications, run update-command-not-found as root to fix this
Sorry, command-not-found has crashed! Please file a bug report at:
http://www.debian.org/Bugs/Reporting
Please include the following information with the report:
command-not-found version: 0.3
Python version: 3.7.3 final 0
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
Exception information:
local variable 'cnf' referenced before assignment
Traceback (most recent call last):
File "/usr/share/command-not-found/CommandNotFound/util.py", line 23, in crash_guard
callback()
File "/usr/lib/command-not-found", line 93, in main
if not cnf.advise(args[0], options.ignore_installed) and not options.no_failure_msg:
UnboundLocalError: local variable 'cnf' referenced before assignment
Hmm, I guess something isn´t here as it should be:
The command “update-command-not-found” (run as root) had no effect either.
On Debian:
dpkg -l | grep command-not-found
ii command-not-found 18.04.5-1 all Suggest installation of packages in interactive bash sessions
In contrast to Lubuntu there´s no python3-commandnotfound
installed. I´ve no idea whether that´s important (but it might be).
Plus: there seems to be no installation candidate for that one in Debian:
E: Paket python3-commandnotfound kann nicht gefunden werden. # package cannot be found
Does anyone have any idea on how to get “command-not-found” running in Debian
Many thanks in advance for your help.
Many greetings from Rosika.