Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
Thanks a ton, it worked... –  Sameer Mar 12 '13 at 17:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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