I was trying to update an old software and a friend suggested that my apt was in an older version, so I followed the steps in item 2) of this link. I downloaded the most recent .deb for my architecture (apt_1.9.4ubuntu0.1_amd64.deb) and tried installing, which lead to two unmet dependencies, one of which I managed to install without errors (libapt-inst2.0_1.8.4_amd64).
$ sudo dpkg -i apt_1.9.4ubuntu0.1_amd64.deb
(Reading database ... 193526 files and directories currently installed.)
Preparing to unpack apt_1.9.4ubuntu0.1_amd64.deb ...
Unpacking apt (1.9.4ubuntu0.1) over (1.9.4ubuntu0.1) ...
dpkg: dependency problems prevent configuration of apt:
apt depends on libgnutls30 (>= 3.6.6); however:
Package libgnutls30:amd64 is not configured yet.
dpkg: error processing package apt (--install):
dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.29-0ubuntu2) ...
Processing triggers for man-db (2.8.5-2) ...
Errors were encountered while processing:
apt
The second dependency (libnutls30) had other dependencies that I also tried to install manually.
$ sudo dpkg -i libgnutls30_3.6.15-4ubuntu2_amd64.deb
(Reading database ... 193526 files and directories currently installed.)
Preparing to unpack libgnutls30_3.6.15-4ubuntu2_amd64.deb ...
Unpacking libgnutls30:amd64 (3.6.15-4ubuntu2) over (3.6.13-2ubuntu1) ...
dpkg: dependency problems prevent configuration of libgnutls30:amd64:
libgnutls30:amd64 depends on libhogweed6 (>= 3.4.1~rc1); however:
Package libhogweed6:amd64 is not configured yet.
libgnutls30:amd64 depends on libnettle8 (>= 3.4.1~rc1); however:
Package libnettle8 is not installed.
libgnutls30:amd64 depends on libp11-kit0 (>= 0.23.18.1); however:
Version of libp11-kit0:amd64 on system is 0.23.15-2.
libgnutls30:amd64 depends on libtasn1-6 (>= 4.14); however:
Version of libtasn1-6:amd64 on system is 4.13-3.
dpkg: error processing package libgnutls30:amd64 (--install):
dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.29-0ubuntu2) ...
Errors were encountered while processing:
libgnutls30:amd64
This appears to have been a huge mistake since now my Package Manager seems to be broken:
$ sudo apt-get update
/usr/lib/apt/methods/http: error while loading shared libraries: libnettle.so.8: cannot open shared object file: No such file or directory
/usr/lib/apt/methods/http: error while loading shared libraries: libnettle.so.8: cannot open shared object file: No such file or directory
/usr/lib/apt/methods/http: error while loading shared libraries: libnettle.so.8: cannot open shared object file: No such file or directory
/usr/lib/apt/methods/http: error while loading shared libraries: libnettle.so.8: cannot open shared object file: No such file or directory
/usr/lib/apt/methods/http: error while loading shared libraries: libnettle.so.8: cannot open shared object file: No such file or directory
/usr/lib/apt/methods/http: error while loading shared libraries: libnettle.so.8: cannot open shared object file: No such file or directory
/usr/lib/apt/methods/http: error while loading shared libraries: libnettle.so.8: cannot open shared object file: No such file or directory
/usr/lib/apt/methods/https: error while loading shared libraries: libnettle.so.8: cannot open shared object file: No such file or directory
Reading package lists... Done
E: Method http has died unexpectedly!
E: Sub-process http returned an error code (127)
E: Method /usr/lib/apt/methods/http did not start correctly
E: Method http has died unexpectedly!
E: Sub-process http returned an error code (127)
E: Method /usr/lib/apt/methods/http did not start correctly
E: Method http has died unexpectedly!
E: Sub-process http returned an error code (127)
E: Method /usr/lib/apt/methods/http did not start correctly
E: Method http has died unexpectedly!
E: Sub-process http returned an error code (127)
E: Method /usr/lib/apt/methods/http did not start correctly
E: Method http has died unexpectedly!
E: Sub-process http returned an error code (127)
E: Method /usr/lib/apt/methods/http did not start correctly
E: Method http has died unexpectedly!
E: Sub-process http returned an error code (127)
E: Method /usr/lib/apt/methods/http did not start correctly
E: Method http has died unexpectedly!
E: Sub-process http returned an error code (127)
E: Method /usr/lib/apt/methods/http did not start correctly
E: Method https has died unexpectedly!
E: Sub-process https returned an error code (127)
E: Method /usr/lib/apt/methods/https did not start correctly
E: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/disco/InRelease
E: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/disco-updates/InRelease
E: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/disco-backports/InRelease
E: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/disco-security/InRelease
E: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/InRelease
E: Failed to fetch http://download.opensuse.org/repositories/home:/hpcoder1/xUbuntu_19.04/InRelease
E: Failed to fetch http://ppa.launchpad.net/kdenlive/kdenlive-stable/ubuntu/dists/disco/InRelease
E: Failed to fetch https://packages.microsoft.com/repos/ms-teams/dists/stable/InRelease
E: Some index files failed to download. They have been ignored, or old ones used instead.
I have tried:
- removing the broken packages using
apt remove - installing back the older version of apt (apt_1.8.3)
- running
apt --fix-broken install sudo apt-get -u dist-upgrade(gives other unmet dependencies)- the answers in here
- the solutions to this question