After updating to version 20.04 (forcefully using -d command), I am not able to update or upgrade neither using termical nor using software now.
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
This returned in the last while trying to update, also I have a red marker beside the battery icon which says the same "a problem occurred when checking for updates"
Contents at cd /etc/apt/sources.list.d/
-rw-r--r-- 1 root root 221 Aug 27 23:59 google-chrome.list
-rw-r--r-- 1 root root 189 Aug 27 23:20 google-chrome.list.distUpgrade
Any help would be appreciated. I am new to Ubuntu.
Edit:
sudo apt upgrade
gives this error:
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
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
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: libimagequant0 (>= 2.11.10) but it is not installed
python3-protobuf : Depends: libprotobuf17 but it is not installed
python3-uno : Depends: libreoffice-core (= 1:6.4.5-0ubuntu0.20.04.1) but 1:6.0.7-0ubuntu0.18.04.10 is installed or
libreoffice-core-nogui (= 1:6.4.5-0ubuntu0.20.04.1) but it is not installed
Depends: libpython3.8 (>= 3.8.2) but it is not installed
Depends: libuno-cppu3 (>= 4.4.0~alpha) but it is not installed
Depends: libuno-cppuhelpergcc3-3 (>= 5.3.0~alpha) but it is not installed
Depends: libuno-sal3 (>= 5.4.0~alpha) but it is not installed
Depends: libuno-salhelpergcc3-3 (>= 3.6.0~beta) but it is not installed
Depends: uno-libs-private 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: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies```
apt --fix-broken install
which gave Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root? – Dude901 Aug 28 '20 at 10:06sudo apt --fix-broken install
– Archisman Panigrahi Aug 29 '20 at 11:38sudo aptitude -f upgrade
– Error404 Oct 30 '21 at 01:57