1

When I try to update my system, it returns the following error:

serj@debianochka:~$ sudo apt update

/usr/lib/apt/methods/http: error while loading shared libraries: libnettle.so.6: cannot open shared object file: No such file or directory /usr/lib/apt/methods/http: error while loading shared libraries: libnettle.so.6: cannot open shared object file: No such file or directory /usr/lib/apt/methods/http: error while loading shared libraries: libnettle.so.6: cannot open shared object file: No such file or directory /usr/lib/apt/methods/http: error while loading shared libraries: libnettle.so.6: cannot open shared object file: No such file or directory /usr/lib/apt/methods/http: error while loading shared libraries: libnettle.so.6: cannot open shared object file: No such file or directory /usr/lib/apt/methods/http: error while loading shared libraries: libnettle.so.6: 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: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease
E: Failed to fetch http://deb.debian.org/debian-security/dists/buster/updates/InRelease
E: Failed to fetch http://deb.debian.org/debian/dists/buster-updates/InRelease E: Failed to fetch http://httpredir.debian.org/debian/dists/stretch-backports/InRelease
E: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/InRelease E: Failed to fetch http://packages.microsoft.com/repos/vscode/dists/stable/InRelease E: Some index files failed to download. They have been ignored, or old ones used instead.

If i try to install any program, then error:

serj@debianochka:~$ sudo apt install git

Reading package lists... Done Building dependency tree Reading state information... Done git is already the newest version (1:2.20.1-2+deb10u1). You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: dnsmasq-base : Depends: libnettle6 (>= 3.4~) but it is not going to be installed gstreamer1.0-plugins-bad : Depends: libnettle6 but it is not going to be installed iputils-ping : Depends: libnettle6 but it is not going to be installed libarchive13 : Depends: libnettle6 but it is not going to be installed libcurl3-gnutls : Depends: libnettle6 but it is not going to be installed libgnutls30 : Depends: libnettle6 (>= 3.4~) but it is not going to be installed libhogweed4 : Depends: libnettle6 (= 3.4.1-1) but it is not going to be installed librtmp1 : Depends: libnettle6 but it is not going to be installed wget : Depends: libnettle6 but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

apt --fix-broken install NOT Working

If i input: serj@debianochka:~$ sudo apt --fix-broken install

Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following additional packages will be installed: libnettle6 /usr/lib/apt/methods/http: error while loading shared libraries: libnettle.so.6: cannot open shared object file: No such file or directory 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

full error

1
  • 1
    You should copy&paste the command and its output as text and format it as a code block. I suggest to put a line ~~~ before and after it. You can try to download a libnettle6 package matching your distribution and version and manually install it with dpkg. See also superuser.com/questions/1386209/…
    – Bodo
    Commented Jan 27, 2020 at 18:45

1 Answer 1

2

As mentioned in comments by @Bodo, it looks like you reached a point where apt removed libnettle which is required to run ... apt.

Try to download the corresponding package for your architecture using https://packages.debian.org and install it manually using dpkg -i <path to the .deb>.

You can try with wget <URL> or curl <URL> > libnettle.deb.

If both curl and wget fail because they also depends on libnettle, then, try downloading it from another PC and use SSH to copy it.

Then, re-run apt-get install --fix-broken.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .