I'm trying to get command-not-found
package to work. That's the one which tells what to install when the user types a missing command, for instance:
$ zbarcam
The program 'zbarcam' is currently not installed. You can install it by typing:
sudo apt-get install zbar-tools
However, when I try to set it up, I get the following error
$ sudo update-command-not-found
Traceback (most recent call last):
File "/usr/sbin/update-command-not-found", line 26, in <module>
col.create(db)
File "/usr/share/command-not-found/CommandNotFound/db/creator.py", line 94, in create
self._fill_commands(con)
File "/usr/share/command-not-found/CommandNotFound/db/creator.py", line 132, in _fill_commands
self._parse_single_contents_file(con, f, fp.stdout)
File "/usr/share/command-not-found/CommandNotFound/db/creator.py", line 271, in _parse_single_contents_file
priority = component_priorities[component]
KeyError: 'rpi'
I'm pretty certain I don't have anything non-standard in apt
sources, and the issue seems to come from the rpi
component which is indeed in the default sources.list
:
deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
Is there any way to get it to work, preferably without removing the rpi
component?