Search code examples
linuxpermissionsrstudiosudocpu-architecture

sudo throw error cannot execute binary file exec format error


I made a mistake while trying to install Rstudio in a debian with this command:

sudo gdebi rstudio-server-1.2.5033-amd64.deb

and now if I try to use sudo again, I ve got this message :

sudo apt-get update: bash: /usr/bin/sudo : cannot execute binary file: Exec format error

How can I reverse this error ?

Thanks


Solution

  • Ok so I manage to fix it, here is what I've done,

    login to root with su, remove the alter version of sudo with: apt-get remove sudo:amd64 reinstall the correct version: apt-get install sudo exit root mode and try it gain, now it works.

    thanks