Tom.Rampley
Tom.Rampley

Reputation: 422

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.

Upvotes: 4

Views: 10656

Answers (4)

radhikesh93
radhikesh93

Reputation: 940

I had similar issue, ran below commands to fix it.

  1. Use the rpm command to list all installed packages with "R" in the name:
rpm -qa | grep R

This command will list all installed packages that have "R" in their name.

  1. Use the yum remove command to remove each of the packages listed by the previous command. For example:
sudo yum remove R-4.2.3-1-1.x86_64

Upvotes: 0

Euijin
Euijin

Reputation: 11

I'm not working code below.

enter image description here

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

so I try this one!

sudo yum erase R-core
sudo yum erase R-devel
sudo yum erase R-core-devel

so that I solved the problem.

enter image description here

Upvotes: 0

Technophobe01
Technophobe01

Reputation: 8676

If you want to check what is installed you can use yum to list installed packages:

#sudo yum list installed R*

this allows you to check what specific R components are installed. On Centos you can then use the erase command to delete them.

#sudo yum erase R*; sudo yum install R

the sudo yum list installed is useful in these situations. The corollary to sudo yum list installed is the yum list r\-* which is useful for looking at what you can install from your repos.

Upvotes: 2

Tom.Rampley
Tom.Rampley

Reputation: 422

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.

Upvotes: 5

Related Questions