shiyi@shiyi-VM42:$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
我正在尝试使用以下命令更新我的系统:
shiyi@shiyi-VM42:$ sudo apt update
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu focal InRelease
Get:3 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Fetched 336 kB in 1s (297 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: libapt-pkg.so.6.0: cannot open shared object file: No such file or directory
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
这是我收到的错误:
shiyi@shiyi-VM42:$ sudo apt-get upgrade
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
aptdaemon : Depends: python3-aptdaemon (= 1.1.1+bzr982-0ubuntu32) but 1.1.1+bzr982-0ubuntu19.2 is installed
dirmngr : Depends: init-system-helpers (>= 1.52) but 1.51 is installed
gir1.2-gtk-3.0 : Depends: gir1.2-gdkpixbuf-2.0 (>= 2.40.0) but 2.36.11-2 is installed
Depends: gir1.2-pango-1.0 (>= 1.41.0) but 1.40.14-1ubuntu0.1 is installed
Depends: libgtk-3-0 (>= 3.24.7) but 3.22.30-1ubuntu4 is installed
gnupg : Depends: gpgv (>= 2.2.19-3ubuntu2)
gpg-agent : Depends: init-system-helpers (>= 1.52) but 1.51 is installed
hplip : Depends: hplip-data (= 3.20.3+dfsg0-2) but 3.17.10+repack0-5 is installed
Depends: libhpmud0 (= 3.20.3+dfsg0-2) but 3.17.10+repack0-5 is installed
Depends: printer-driver-hpcups (= 3.20.3+dfsg0-2) but 3.17.10+repack0-5 is installed
Depends: libpython3.8 (>= 3.8.2) but it is not installed
libsane-hpaio : Depends: libhpmud0 (>= 3.20.3+dfsg0) but 3.17.10+repack0-5 is installed
python-apt : Depends: python2 (< 2.8) but it is not installed
Depends: python2 (>= 2.7~) but it is not installed
Depends: python2:any (< 2.8)
Depends: python2:any (>= 2.7~)
Depends: libapt-pkg6.0 (>= 1.9.11~) but it is not installed
python3-apt : Depends: libapt-pkg6.0 (>= 1.9.11~) but it is not installed
python3-brlapi : Depends: libbrlapi0.7 but it is not installed
python3-gi : Depends: libgirepository-1.0-1 (>= 1.62.0-4~) but 1.56.1-1 is installed
python3-pil : Depends: libfreetype6 (>= 2.9.1) but 2.8.1-2ubuntu2 is installed
Depends: libimagequant0 (>= 2.11.10) but it is not installed
python3-protobuf : Depends: libprotobuf17 but it is not installed
rhythmbox-plugins : Depends: librhythmbox-core10 (= 3.4.4-1ubuntu2) but 3.4.2-4ubuntu1 is installed
Depends: rhythmbox (= 3.4.4-1ubuntu2) but 3.4.2-4ubuntu1 is installed
Depends: gir1.2-rb-3.0 (= 3.4.4-1ubuntu2) but 3.4.2-4ubuntu1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
我怎样才能解决这个问题?