Search code examples
linuxrredhatuninstallationyum

R redhat uninstall


I am trying to uninstall R in redhat 6. I was successfully able to install but in the course of trying to install some non-R packages I ended up deleting some directories that apparently contained R source files and now I can't remove R or reinstall it. When I try to run R I get this message:

/usr/bin/R: line 236: /usr/lib64/R/etc/ldpaths: No such file or directory

yum remove R gives this:

Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing    : R-3.1.2-1.el6.x86_64                                                                                                                      1/1
  Verifying  : R-3.1.2-1.el6.x86_64                                                                                                                      1/1

Removed:
  R.x86_64 0:3.1.2-1.el6

But when I try to install R with yum install R I get:

Downloading Packages:
R-3.1.2-1.el6.x86_64.rpm                                                                                                              |  23 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : R-3.1.2-1.el6.x86_64                                                                                                                      1/1
  Verifying  : R-3.1.2-1.el6.x86_64                                                                                                                      1/1

Installed:
  R.x86_64 0:3.1.2-1.el6

But the same error is thrown when I try to open an R shell. Yum reinstall R also doesn't work.

I'm guessing yum remove R isn't really removing it entirely, and the issue seems to be the missing ldpath file. Any help on how to resolve this and clear R from my machine entirely would be great. Thanks.


Solution

  • So it turns out that the problem is that I needed to uninstall several other R packages to actually rid the system of all the environmental variables that were screwing up the reinstall. The following commands totally uninstalled R:

    yum uninstall R
    yum uninstall R-core
    yum uninstall R-devel
    yum uninstall R-core-devel
    

    And that did it for me. From there I was able to successfully reinstall R.