0

Im not sure why i'm getting the following error

Traceback (most recent call last):
  File "/usr/lib/cnf-update-db", line 8, in <module>
    from CommandNotFound.db.creator import DbCreator
  File "/usr/lib/python3/dist-packages/CommandNotFound/db/creator.py", line 4, in <module>
    import json
ModuleNotFoundError: No module named 'json'
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

when running a simply sudo apt update

0

1 Answer 1

1

Looks like a badly built package (assuming that json is installed on the user's system when it is actually outside the standard library).

You can use pip to globally install json: just write pip install json. You may need to install pip separately.

Not the answer you're looking for? Browse other questions tagged .