当我尝试更新时,它显示此错误。我使用 Ubuntu 20.04
404 Not Found [IP: 91.189.95.85 80] Err:18 http://ppa.launchpad.net/snwh/pulp/ubuntu focal Release 404 Not Found [IP: 91.189.95.85 80] 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: The repository 'http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu focal Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://ppa.launchpad.net/snwh/pulp/ubuntu focal Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. 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
在我遇到这种情况之前,我将我的 python3 版本升级到了 3.9.6。这会影响某些 gnome 应用程序,例如 gnome tweek(无法打开)。目前我正在使用内核 5.10。
当我输入错误命令时它会显示崩溃消息
Traceback (most recent call last): File "/usr/lib/command-not-found", line 28, in from CommandNotFound import CommandNotFound File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 19, in from CommandNotFound.db.db import SqliteDatabase File "/usr/lib/python3/dist-packages/CommandNotFound/db/db.py", line 5, in import apt_pkg ModuleNotFoundError: No module named 'apt_pkg'