Install of Rstudio Server on Ubuntu tries to remove sudo

Trying to install R Studio server 1.1.442 on Ubuntu 16.04

The package install fails because it was trying to remove sudo. I'm glad it did fail, because I dont want that package removed.

Why is it doing this and how can I restore my previous version of 1.1.3xx which seems to have been removed.

Here are the error logs after install.

Reading package lists... Done
Building dependency tree        
Reading state information... Done
Reading state information... Done
Requires the REMOVAL of the following packages: sudo 
Requires the installation of the following packages: gcc-6-base:i386 libapparmor1:i386 libaudit1:i386 libbsd0:i386 libc6:i386 libdb5.3:i386 libedit2:i386 libgcc1:i386 libpam-modules:i386 libpam0g:i386 libpcre3:i386 libselinux1:i386 libssl1.0.0:i386 libtinfo5:i386 sudo:i386 

RStudio Server
 RStudio is a set of integrated tools designed to help you be more productive with R. It includes a console, syntax-highlighting editor that supports direct code execution, as well as tools for plotting, history, and workspace management.
Do you want to install the software package? [y/N]:y 
Fetched 0 B in 0s (0 B/s)                                                      
Preconfiguring packages ...
Preconfiguring packages ...
(Reading database ... 204264 files and directories currently installed.)
Removing sudo (1.8.16-0ubuntu1.5) ...
You have asked that the sudo package be removed,
but no root password has been set.
Without sudo, you may not be able to gain administrative privileges.

If you would prefer to access the root account with su(1)
or by logging in directly,
you must set a root password with "sudo passwd".

If you have arranged other means to access the root account,
and you are sure this is what you want,
you may bypass this check by setting an environment variable 
(export SUDO_FORCE_REMOVE=yes).

Refusing to remove sudo.
dpkg: error processing package sudo (--remove):
 subprocess installed pre-removal script returned error exit status 1
Errors were encountered while processing:
 sudo
E:Sub-process /usr/bin/dpkg returned an error code (1)
Error during install: 'installArchives() failed'

Did you verify that you are trying to install the correct installation type (i.e. do you have the 64-bit ubuntu server installed and are trying to install the 64-bit RStudio Server intallation or vice versa. The i386 tag on the 6th line of your log file looks like you are trying to install the 32-bit of RStudio Server and your system likely doesn't have the 32-bit versions of programs. For most of these, it will just install the 32-bit versions in addition to the 64-bit. However, sudo won't do this.

You should verify that you have the correct version. 64-bit version ends with amd64.deb while the 32-bit ends with i386.deb

1 Like

Thank you @tbradley. That was exactly it.

I knew I had a 64 bit system, but must have been asleep when I was upgrading. All looks good now. Thank you for taking the time to diagnose.

1 Like