1

It seems I have landed in trouble....

on running update-manager or synaptic I get this message

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

I searched for solutions and found couple of them. First was to use command

sudo dpkg --remove --force-remove-reinstreq sudo

it failed with an error message

dpkg: error: --remove needs at least one package name argument
Type dpkg --help for help about installing and deinstalling packages [*];
Use `dselect' or `aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;

Options marked [*] produce a lot of output - pipe it through `less' or `more' !

I tried adding dependecies but again something else was dependent on them. I quit this approach after few tries.

The Other approach was to use

 # become root
   sudo -i
   cd /var/lib/dpkg/info
   rm -rf sudo*

   dpkg --remove --force-remove-reinstreq sudo

   exit

This also failed.

Both these approaches are given in Apt/Synaptic needs to reinstall package. Do I have any other way to recover from this error?

Thanks

Sameer
  • 45

1 Answers1

1

Try downloading sudo package and installing it manually:

# for 64bit system
wget http://security.ubuntu.com/ubuntu/pool/main/s/sudo/sudo_1.8.5p2-1ubuntu1.1_amd64.deb
# for 32bit system
wget http://security.ubuntu.com/ubuntu/pool/main/s/sudo/sudo_1.8.5p2-1ubuntu1.1_i386.deb
sudo dpkg -i sudo_*.deb

If you can't use sudo to run the last command try to restart in recovery mode and execute it as root user.

Salem
  • 19,744