[R] change default installation of R

Matthew mccormack at molbio.mgh.harvard.edu
Thu Oct 30 21:46:51 CET 2014


I have R version 2.15.0 installed in /usr/local/bin, and this is the 
default; in other words when I type which R this is the path I get.

I also have installed R into/usr/local/R-3.1.1/.   I used ./configure 
and then make to install this version. After make, I get the following 
error messages:

../unix/sys-std.o: In function `initialize_rlcompletion':
/usr/local/R-3.1.1/src/unix/sys-std.c:689: undefined reference to 
`rl_sort_completion_matches'
collect2: ld returned 1 exit status
make[3]: *** [R.bin] Error 1
make[3]: Leaving directory `/usr/local/R-3.1.1/src/main'
make[2]: *** [R] Error 2
make[2]: Leaving directory `/usr/local/R-3.1.1/src/main'
make[1]: *** [R] Error 1
make[1]: Leaving directory `/usr/local/R-3.1.1/src'
make: *** [R] Error 1

I want to change R-3.1.1 to the default, so that when I type which R, I 
get /usr/local/R-3.1.1

To do this I first cd'd into /usr/local/bin and renamed R to R-old_10-30-14
then created a symlink by 'ln -s /usr/local/R-3.1.1/bin  R'
but when I type which R, I get 'no R in ... , where ' . . . ' is my PATH 
variable.

If I remove the symlink and then create another one with ln -s 
/usr/local/R-3.1.1/bin/R  R,
then after typing 'which R', I get
/usr/local/bin/R: line 259: /usr/local/R-3.1.1/bin/exe
c/R: No such file or directory
/usr/local/bin/R: line 259: exec: /usr/local/R-3.1.1/bin/exec/R: cannot 
execute: No such file or directory

This is the same message I get if I just type at the command line: 
/usr/local/R-3.1.1/bin/R.

Matthew

	[[alternative HTML version deleted]]



More information about the R-help mailing list