"apt-get update" fails to run when command-not-found is installed on Ubuntu 20.04.
To reproduce with Docker:
docker pull ubuntu:20.04 # Pull the latest version of the Ubuntu 20.04 docker image
docker run -it ubuntu:20.04 # Start interactively an Ubuntu 20.04 docker container
Traceback (most recent call last):
File "/usr/lib/cnf-update-db", line 26, in <module>
col.create(db)
File "/usr/lib/python3/dist-packages/CommandNotFound/db/creator.py", line 93, in create
self._fill_commands(con)
File "/usr/lib/python3/dist-packages/CommandNotFound/db/creator.py", line 127, in _fill_commands
self._parse_single_commands_file(con, fp)
File "/usr/lib/python3/dist-packages/CommandNotFound/db/creator.py", line 165, in _parse_single_commands_file
suite=tagf.section["suite"]
KeyError: 'suite'
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code
"apt-get update" fails to run when command-not-found is installed on Ubuntu 20.04.
To reproduce with Docker:
docker pull ubuntu:20.04 # Pull the latest version of the Ubuntu 20.04 docker image
docker run -it ubuntu:20.04 # Start interactively an Ubuntu 20.04 docker container
# Within the container run:
apt-get update
apt-get -yy dist-upgrade
apt-get -yy install command-not-found
exec bash # Reload bash
apt-get update # Update command-not-found database
Traceback (most recent call last): cnf-update- db", line 26, in <module> python3/ dist-packages/ CommandNotFound /db/creator. py", line 93, in create _fill_commands( con) python3/ dist-packages/ CommandNotFound /db/creator. py", line 127, in _fill_commands _parse_ single_ commands_ file(con, fp) python3/ dist-packages/ CommandNotFound /db/creator. py", line 165, in _parse_ single_ commands_ file tagf.section[ "suite" ] :Post-Invoke- Success 'if /usr/bin/test -w /var/lib/ command- not-found/ -a -e /usr/lib/ cnf-update- db; then /usr/lib/ cnf-update- db > /dev/null; fi'
File "/usr/lib/
col.create(db)
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
suite=
KeyError: 'suite'
Reading package lists... Done
E: Problem executing scripts APT::Update:
E: Sub-process returned an error code