输入以下内容后,在更新过程中出现问题sudo apt-get update
:
Get:1 file:/var/cuda-repo-10-1-local-10.1.243-418.87.00 InRelease
Ign:1 file:/var/cuda-repo-10-1-local-10.1.243-418.87.00 InRelease
Get:2 file:/var/cuda-repo-10-1-local-10.1.243-418.87.00 Release [574 B]
Get:2 file:/var/cuda-repo-10-1-local-10.1.243-418.87.00 Release [574 B]
Hit:4 http://ppa.launchpad.net/atareao/telegram/ubuntu bionic InRelease
Hit:5 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:6 http://graphics.tuxedocomputers.com/ubuntu bionic InRelease
Get:7 http://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]
Ign:8 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:9 http://oibaf.tuxedocomputers.com/ubuntu bionic InRelease
Hit:10 http://deb.tuxedocomputers.com/ubuntu bionic InRelease
Hit:11 http://packages.microsoft.com/repos/vscode stable InRelease
Hit:12 http://dl.google.com/linux/chrome/deb stable Release
Hit:13 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic InRelease
Get:14 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88,7 kB]
Hit:15 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease
Ign:16 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 InRelease
Hit:17 http://ppa.launchpad.net/jonathonf/gcc-9.0/ubuntu bionic InRelease
Hit:18 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 Release
Hit:19 https://storage.googleapis.com/bazel-apt stable InRelease
Get:20 http://ppa.launchpad.net/libratbag-piper/piper-libratbag-git/ubuntu bionic InRelease [15,9 kB]
Get:21 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74,6 kB]
Hit:22 http://ppa.launchpad.net/linuxuprising/java/ubuntu bionic InRelease
Hit:23 http://ppa.launchpad.net/lutris-team/lutris/ubuntu bionic InRelease
Hit:24 http://ppa.launchpad.net/obsproject/obs-studio/ubuntu bionic InRelease
Hit:25 http://ppa.launchpad.net/paulo-miguel-dias/pkppa/ubuntu bionic InRelease
Hit:26 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic InRelease
Hit:28 http://ppa.launchpad.net/ubuntu-x-swat/updates/ubuntu bionic InRelease
Hit:29 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease
Get:30 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [38,5 kB]
Get:31 http://security.ubuntu.com/ubuntu bionic-security/main DEP-11 48x48 Icons [17,6 kB]
Get:33 http://security.ubuntu.com/ubuntu bionic-security/main DEP-11 64x64 Icons [41,5 kB]
Get:34 http://security.ubuntu.com/ubuntu bionic-security/main DEP-11 128x128 Icons [97,7 kB]
Get:35 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [295 kB]
Get:36 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [42,2 kB]
Get:37 http://archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 48x48 Icons [73,8 kB]
Get:38 http://ppa.launchpad.net/libratbag-piper/piper-libratbag-git/ubuntu bionic/main amd64 Packages [1.552 B]
Get:39 http://security.ubuntu.com/ubuntu bionic-security/universe DEP-11 48x48 Icons [16,4 kB]
Get:40 http://ppa.launchpad.net/libratbag-piper/piper-libratbag-git/ubuntu bionic/main i386 Packages [1.548 B]
Get:41 http://security.ubuntu.com/ubuntu bionic-security/universe DEP-11 64x64 Icons [111 kB]
Get:42 http://archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 64x64 Icons [143 kB]
Get:43 http://security.ubuntu.com/ubuntu bionic-security/universe DEP-11 128x128 Icons [181 kB]
Get:44 http://archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 128x128 Icons [364 kB]
Get:45 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2.464 B]
Get:46 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [254 kB]
Get:47 http://archive.ubuntu.com/ubuntu bionic-updates/universe DEP-11 48x48 Icons [196 kB]
Get:48 http://archive.ubuntu.com/ubuntu bionic-updates/universe DEP-11 64x64 Icons [433 kB]
Get:49 http://archive.ubuntu.com/ubuntu bionic-updates/universe DEP-11 128x128 Icons [952 kB]
Get:50 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2.468 B]
Get:51 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [7.924 B]
Fetched 3.540 kB in 5s (740 kB/s)
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 11, in <module>
import apt_pkg
ImportError: No module named 'apt_pkg'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
import apt_pkg
ImportError: No module named 'apt_pkg'
Original exception was:
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 11, in <module>
import apt_pkg
ImportError: 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
有人知道我可以从哪里开始解决这个问题吗?