Need help validating R uninstall


#1

Hello,

I uninstalled RStudio Server (open source) from RedHat Linux Server successfully using the following command

> sudo yum remove rstudio-server

However, I want to uninstall R as well from that server as I want to build R from the source so I can install RStudio Connect as well on that server.
I used following command to install R

> sudo yum install R

However now, when I uninstalling R, apparently uninstall is going successful but at the end of it I am still able to launch R from the server. Can someone help? Not sure what I am missing here?

> sudo yum remove R
Loaded plugins: enabled_repos_upload, package_upload, product-id, refresh-packagekit, search-disabled-repos, security, subscription-manager
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package R.x86_64 0:3.5.0-3.el6 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================================================================================
 Package                                             Arch                                                     Version                                                          Repository                                               Size
=============================================================================================================================================================================================================================================
Removing:
 R                                                   x86_64                                                   3.5.0-3.el6                                                      @epel                                                   0.0

Transaction Summary
=============================================================================================================================================================================================================================================
Remove        1 Package(s)

Installed size: 0
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing    : R-3.5.0-3.el6.x86_64                                                                                                                                                                                                      1/1
Uploading Package Profile
GEN2-AUTOMATION-PROD_CompanyName_RHEL_Custom_CompanyName_RHEL6_x86_64_Custom                                                                                                                                                    | 2.1 kB     00:00
rhel-6-server-optional-rpms                                                                                                                                                                                           | 2.0 kB     00:00
rhel-6-server-rpms                                                                                                                                                                                                    | 2.0 kB     00:00
rhel-6-server-satellite-tools-6.2-rpms                                                                                                                                                                                | 2.1 kB     00:00
rhel-server-rhscl-6-rpms                                                                                                                                                                                              | 2.0 kB     00:00
  Verifying  : R-3.5.0-3.el6.x86_64                                                                                                                                                                                                      1/1

**Removed:**
**  R.x86_64 0:3.5.0-3.el6**

Complete!
Uploading Enabled Repositories Report
Loaded plugins: product-id, refresh-packagekit, subscription-manager
> R
R version 3.5.0 (2018-04-23) -- "Joy in Playing"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> q()
Save workspace image? [y/n/c]:

#2

This comment is important, since it seems you want to remove yum R only to be able to install R from source.

Now, it's not clear to me why your uninstall of R fails (could it be that you've installed R from source previously). But perhaps which R will at least tell you where the R installation is.

Anyway, you can simply install R from source, regardless of whether you have an existing yum R on the machine.

Installing R from source should not interfere with any existing R installations. Once you have both R and RStudio Connect installed, just be sure to point Connect to the installation of R you actually want to use.


#3

Hi Andrie,
Thank you for your response. No I have never installed R from the source before but some places it said just "R" package is a wrapper and it doesn't really have any of its own contents and I may need to uninstall all the other "R packages" but I am not quite sure what all "R packages" maybe installed.

Some of the R Packages I was able to identify are:
R-java-3.5.0-3.el6.x86_64
R-java-devel-3.5.0-3.el6.x86_64
libRmath-3.5.0-3.el6.x86_64
R-core-3.5.0-3.el6.x86_64
R-core-devel-3.5.0-3.el6.x86_64
R-devel-3.5.0-3.el6.x86_64

There maybe others but not sure how to identify and be sure about them and I am not sure if there is any particular order of uninstall for these packages.

Apart from uninstall, I am still not very clear why R needs to be built from source rather than installing from package in order for RStudio connect to work?

Why can we not maintain multiple versions of R if we installed various versions using packages?

Version:1.0 StartHTML:000000221 EndHTML:000004684 StartFragment:000004281 EndFragment:000004596 StartSelection:000004281 EndSelection:000004596 SourceURL:http://docs.rstudio.com/connect/admin/getting-started.html

Administrators should install the versions of R that they wish to support from source so that user content is run in an environment as close as possible to the development environment. This allows maintenance of multiple versions of R simultaneously and mitigates the risk associated with updating the version of R.
Thanks in advance for your response.


#4

The reason we recommend installing R from source is because this allows you to have multiple versions of R side by side, typically at /opt/R/3.5.0, etc.

In contrast, if you install R from the yum package manager, every time you upgrade you will overwrite the existing version. In other words, yum will only ever maintain one version of R, and AFAIK there is no possibility of changing the install path for yum.

So, if you only ever want to have a single version of R, then RStudio Connect will actually work. However, in time, your users will want to create new assets using later versions of R. In the event that R introduces features that are not backward compatible, your old code base will stop working. This is the reason why you should support multiple versions of R side by side.

You can find a fine blog post about Installing R on RedHat Linux 7, written by @sellorm. This contains a list of yum packages that will get installed by yum install R.