2

I'm trying to update my Raspberry Pi 4 with Raspian via the terminal command:

sudo apt-get update

However, this delivers the following message:

/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: Failed to fetch http://raspbian.raspberrypi.org/raspbian/dists/buster/InRelease  
E: Failed to fetch http://archive.raspberrypi.org/debian/dists/buster/InRelease  
E: Some index files failed to download. They have been ignored, or old ones used instead.

I've been searching all over the web, but can't find the answer. Does anyone know how to fix this?

2

You can manually install the missing library (libnettle) by downloading it manually and installing with

wget http://archive.raspbian.org/raspbian/pool/main/n/nettle/libnettle6_3.4.1-1_armhf.deb
sudo dpkg -i libnettle6_3.4.1-1_armhf.deb

It's hard to say how much damage your system has. If there's a couple of files missing, you can repair it manually, but if you somehow removed half of /usr/lib, it will take less time to simply reinstall.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.