I'm using Ubuntu 22.04.4 LTS. When I try to install or update any package getting the below error
$ node --versionTraceback (most recent call last): File "/usr/lib/command-not-found", line 28, in <module> from CommandNotFound import CommandNotFound File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 19, in <module> from CommandNotFound.db.db import SqliteDatabase File "/usr/lib/python3/dist-packages/CommandNotFound/db/db.py", line 5, in <module> import apt_pkgModuleNotFoundError: No module named 'apt_pkg'
I tried to update and reisntall python-apt
library by runnign the below command. But the issues is still presist.
sudo apt update
sudo apt install --reinstall python-apt