'Eror while updating packages from terminal in linux mint
i need help. since 5 days before, i tried to update packages in Mint using this command
sudo apt update
but, at the end of the process, the terminal gives me traceback
Traceback (most recent call last): File "/usr/lib/cnf-update-db", line 8, in from CommandNotFound.db.creator import DbCreator File "/usr/lib/python3/dist-packages/CommandNotFound/db/creator.py", line 11, in import apt_pkg ModuleNotFoundError: No module named 'apt_pkg' 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
i tried to find the solution to fix this, but i can't. does anyone have a solution?
Solution 1:[1]
I also had the issue with "cp: cannot stat 'apt_pkg.cpython-36m-x86_64-linux-gnu.so': No such file or directory while I was as super user. I did the same command withouth the sudo command and it worked fine. I have in my system python 3.5, 3.6 and 3.7, so I do not think the version of python is a problem.
cp apt_pkg.cpython-36m-x86-64-linux-gnu.so.so apt_pkg.so
I hope this help someone now at 2022 :D
Regards.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Cyberfete |
