How do I uninstall R from my MacBook Pro OSX 10.9.2?
I need to reinstall a later version (The version for the Mavericks operating system.)
Sincerely
Joe Mark
In the "R Installation and Administration" manual says next:
If you want to get rid of R more completely using a Terminal, simply
run (prepend sudo if needed):
rm -rf /Library/Frameworks/R.framework /Applications/R.app \
/usr/bin/R /usr/bin/Rscript
If be exactly, from that point:
http://cran.r-project.org/doc/manuals/r-release/R-admin.html#Uninstalling-under-OS-X
UPD: updated link to R uninstalling section
Related
I'm having trouble installing R from a homebrew formula on our Intel garbage can mac pro at work. I was having trouble installing tidyverse from source code so I removed and have been attempting to reinstalling R, as I thought it might have been a version mismatch somewhere.
I used
brew install R
and after a bunch of output where it's downloading other packages, I get back the following
==> Installing dependencies for r: libpng, freetype, fontconfig, gettext, libffi, pcre, glib, pkg-config, libpthread-stubs, xorgproto, libxau, libxdmcp, libxcb, libx11, libxext, libxrender, lzo, pixman, cairo, gmp, isl, mpfr, libmpc, lz4, xz, zstd, gcc, jpeg-turbo, openblas, pcre2, readline, ca-certificates, openssl#1.1 and tcl-tk
==> Installing r dependency: libpng
Unknown option: -C
usage: git [--version] [--help] [-c name=value]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
<command> [<args>]
Error: Command failed with exit 129: git
Is this in fact a git error? What is the -C command?
Things I've tried:
removing and reinstalling command line tools
removing and reinstalling Homebrew
My machine:
Mac Pro (Late 2013)
2.7 GHz 12-Core Xeon E5
Thanks!
Sam
I think it tries to use an old version of git at /usr/bin/git, but you need to run brew install git to install a newer version of git to /usr/local/bin/git.
If /usr/local/bin/ isn't on your PATH before /usr/bin/, then you can add a line like this to ~/.bash_profile:
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
However /usr/local/bin is included in /etc/paths by default, so it should be added to PATH by programs that run path_helper (like Terminal and iTerm 2 but not Script Editor or Emacs.app).
I'm having trouble trying to install R 3.0.2 in Ubuntu 16.04. I tried adding the repositories of older versions of R but the package for R 3.0.2 cannot be found in apt-get. Has anyone tried installing an older version of R on a newer version of Ubuntu? May I know what the steps are?
I tried also specifying the version in the apt-get install command but it didn't find the right package.
I see the best option in your case is to compile R. If you have never done such a thing, follow this little script in terminal:
# install common R dependencies
sudo apt-get install gcc \
g++ \
gfortran \
bzip2 \
libbz2-dev \
xorg-dev \
liblzma-dev \
libreadline-dev \
libpcre++-dev \
libcurl-dev \
libpango1.0-dev
mkdir R_alternatives
cd R_alternatives
mkdir src
mkdir 3.0.2
cd src
wget https://cran.r-project.org/src/base/R-3/R-3.0.2.tar.gz
tar -xvf R-3.0.2.tar.gz
cd R-3.0.2
#In my opinion is better to compile in one folder (avoid uncompress tar.gz source again, if you get any errors)
mkdir BuildDir
cd BuildDir
# this step will take around 2 minutes
./../configure --with-readline=no --with-x=no --prefix=/home/'user'/R_alternatives/3.0.2
# These two will take longer!!
make
make install
# following the prefix in 'configure' your R libraries are going to be installed in /home/'user'/R_alternatives/3.0.2/lib64/R/library/
# Hence, each time you compile a new R version, it will have its own libraries (this avoid R packages versions problems)
# If you wish more than one library version for the same R version, you must create a new folder and then run
export R_LIBS=/'path_to_your_new_folder'
# If you plan to use this R version in RStudio, you have to edit ~/.bash_profile, therefore you must run:
vi ~/.bash_profile
#or, It is up to you!
gedit ~/.bash_profile
#Then you put this line in end of the file
PATH=/home/'user'/R_alternatives/3.0.2/bin:$PATH
export PATH
# OR...
RSTUDIO_WHICH_R=/home/'user'/R_alternatives/3.0.2/bin/R
export RSTUDIO_WHICH_R
#PS: You can also set the R_LIBS here, in the same way!
First off, see here for a similar & older question on SO.
Pre-compiled binaries of older R releases for various Ubuntu versions (mostly the LTS releases) are available as deb's from the following website:
https://cran.r-project.org/bin/linux/ubuntu/
Unfortunately, there doesn't seem to exist a R 3.0.2 deb package for xenial; only precise still has the R 3.0.2 package. You could try to install the precise package in xenial, but that may come with its own problem set.
Might be best to compile from source following Facottons advice.
When I try to run the following command:
R --slave --no-save --no-restore -e "print('foo')"
I get:
/usr/local/bin/R: line 193: /usr/local/Library/ENV/4.3/sed: No such file or directory
ERROR: option '-e' requires a non-empty argument
Apparently brew recently moved the ENV folder to a new path (see here). I know I can easily symlink the new sed dir to fix the issue but I wanted to know if there is a better workaround / fix (and eventually if this will be fixed in the R source code).
This happens because brew has changed it's paths in this commit so if you've run brew update in the last 4 days, this is what has caused the breakage.
Credit goes to blindjesse for this answer, which is to brew reinstall -s r.
I ran into some other issues when I tried this though. I didn't have X11 installed and I had a conflict with the tcl-tk which meant that it caused some other failures when it was compiling so:
I installed XQuartz from https://www.xquartz.org
Symlinked it to my homebrew folder ln -s /opt/X11/include/X11 /usr/local/include/X11 (note that your homebrew directory may be different)
brew install homebrew/dupes/tcl-tk
brew link --overwrite --force tcl-tk; brew unlink tcl-tk
brew reinstall -s r
And then it worked for me. I think once the r bottle is upgraded this issue should disappear but for the moment this is what I had to do.
Upgraded to Sierra, tried the commands above and also the directions here: https://github.com/Homebrew/homebrew-science/issues/4338. After I also reinstalled the R kernel following the instructions here: https://github.com/IRkernel/IRkernel, things started working again. Oy vey.
To reinstall the R kernel, start R in the terminal and enter the following:
install.packages(c('repr', 'IRdisplay', 'crayon', 'pbdZMQ', 'devtools'))
devtools::install_github('IRkernel/IRkernel')
IRkernel::installspec() # to register the kernel in the current R installation
Rather than having sed's path hardcoded, a simple workaround is to edit the R script and to change line 193 with
SED=$(which sed)
I'm working with R now for some month and I'm still a newbie.
I acutall working for a project to build up R RHadoop and Hadoop.
The sandbox + R + RStudio is already running and working.
I wanted to install R + RStudio also on the bigger cluster with several nodes for testing in cluster mode. But when I installed R, is saw, that a new version comes out, 3.2.2. On my sandbox, I'm still working with 3.2.1.
Version 3.2.2 seems to have some problem with my code, so I want to use 3.2.1, but I'm not able to install older version of R.
How can I install R-3.2.1-2.el6.x86_64 on the cluster as well?
I'm working on centos 6.
Regards,
suerte
I don't know if you found a solution at your problem, but here is how I install old R versions :
0) You should be sure to know which linux version you use
lsb_release -a
You should get something like (this is my result in example):
Distributor ID: Ubuntu
Description: Ubuntu 14.04
Release: 14.04
Codename: trusty
So now I know that my linux is a trusty.
1) After that you need to add a cran repository on your /etc/apt/sources.list
You can find cran address here : https://cran.r-project.org/mirrors.html
That give you access to older package. Choose one for your Linux !!
example :
deb https://cloud.r-project.org/bin/linux/ubuntu trusty/
2) You need to add the registry key to don't have certificate problem. I use this command but fell free to find another one on their website :
gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E084DAB9
gpg -a --export E084DAB9 | apt-key add -
3) Here is the tricky part :
1 --> do an apt-get update to have the new repository
2 --> choose your version in the cran and specify it. That should look like something like that :
apt-get -y install r-base-core=3.1.0-1trusty0 #For R
apt-get -y --force-yes install r-doc-html=3.1.0-1trusty0 #For doc
apt-get -y install r-base-dev=3.1.0-1trusty0 # for dev
etc ...
Just be careful, I had some problems when I tried to install r-base=.... and r-recommended= .... All the time, that had install the latest version.
For the cluster I don't know yet but I think a script should work.
Hope that helped.
Regards
I want to install R on my Red hat cluster which has the version below:
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.3 (Santiago)
When I went to R's homepage and this is what in their repository:
I am wondering there is only redhat version 4 and 5 there and I don't know which version will best fit my operating system.
Texinfo Problem Goes Here
Since I have asked more than 6 questions today. Stackoverflow doesn't like me to ask more questions. So I will put the following questions into this question, sorry about that.
Hi, I was trying to use Expect to automatically log into a remote server and install R.
When I install R, they came up with all kinds of prompts asking 'The package will take xx MB Is that OK with you'?
The command to install:
su -c 'yum install R R-core R-core-devel R-devel'
You need to type in Yes for a few times to finish the installation.
My question is:
Is there a flag for yum install that you can tell the machine to install everything I want you to install. Don't ask me. So I can install those four packages without any prompt.
If that is hard to install in the 'quiet mode', how to write a while loop in Expect so it will send the Y automatically:
Pseudo Code Not Working!
send -- "sudo su -c yum install ...."
while ("Expect '*Is it OK [Y/N]*'"){
send 'Y\r'
# if (expect 'user$')
{break}
}
Thanks a lot in advance.
This is likely due to there being R RPMs in the Extra Packages for Enterprise Linux (EPEL) repos for RHEL6. You can find out more about EPEL on the Fedora website.
You need to configure yum to use EPEL. The easiest way to do this is to install the epel-release package for your platform, eg
su -c 'rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm'
or
su -c 'rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm'
for example. The you can use yum to install R, e.g. you will probably want
su -c 'yum install R R-core R-core-devel R-devel'
so that you pull in the packages needed to build other add-on packages as most CRAN package are not in EPEL.
At the moment, the latest version of R in EPEL is 3.0.1, so one patch release point behind the latest version 3.0.2.