0

Yeah...

I'm getting this error when using apt-get anything on a digitalocean droplet:

E: The package sudo needs to be reinstalled, but I can't find an archive for it.

So according to this answer, I need to purge my server of sudo and all references to it and then reinstall? What fun! That is probably impossible, considering the command to do each of the steps mentioned there begins with sudo!

Is this server dead, or is there a way to fix it?

Ubuntu 16.10.

8
  • 1
    If sudo does not work, can you log in as root instead ?
    – davidgo
    Feb 20, 2018 at 1:58
  • Run sudo -s to become root and stay there until you exit.
    – psusi
    Feb 20, 2018 at 2:38
  • Is there chat on this site
    – Menasheh
    Feb 20, 2018 at 2:56
  • I used wget to get sudo package and reinstall it from su as root. short term single problem solved. More issues though
    – Menasheh
    Feb 20, 2018 at 2:56
  • 1
    Your last comment should be the answer for this question. And your "more issues" should be a new question altogether. It would be even better if you can elaborate how to do it (your exact steps) so it can be used by other visitor of this site to solve your same incident.
    – Darius
    Feb 20, 2018 at 4:20

1 Answer 1

0

Well, my server couldn't figure out how to find a sudo package, but I could from the ubuntu package site:

wget http://security.ubuntu.com/ubuntu/pool/main/s/sudo/sudo_1.8.16-0ubuntu1.4_amd64.deb`

followed by

dpkg -i sudo_1.8.16-0ubuntu1.4_amd64.deb

did the trick for me. I was able to reinstall the sudo package without sudo by using ssh to connect to root directly with a preconfigured ssh key.

You must log in to answer this question.

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