How to configure R-3.1.2 with --enable-R-shlib

I installed R-3.1.2 on Ubuntu using commands

wget http://cran.r-project.org/src/base/R-3/R-3.1.2.tar.gz tar xvfz R-3.1.2.tar.gz cd R-3.1.2 ./configure make sudo make install 

When I tried to start RStudio, I got an error

R shared library (/usr/local/lib/R/lib/libR.so) not found. If this is a custom R assembly, was it built with the --enable-R-shlib option?

So, I came back and tried to reconfigure with

 ./configure --enable-R-shlib=yes make 

But I got an error

 collect2: error: ld returned 1 exit status make[3]: *** [libR.so] Error 1 make[3]: Leaving directory `/usr/local/lib/R-3.1.2/src/main' make[2]: *** [R] Error 2 make[2]: Leaving directory `/usr/local/lib/R-3.1.2/src/main' make[1]: *** [R] Error 1 make[1]: Leaving directory `/usr/local/lib/R-3.1.2/src' make: *** [R] Error 1 

When searching, I found the answer here: How to configure R-3.0.1 with --enable-R-shlib that the problem was that I was trying to compile in a directory that I previously compiled without the option --enable-R-shlib "

I tried to fix the problem using commands

 make uninstall 

which gives no error to many β€œnothing needs to be done to delete.” but it successfully deleted R

 ./configure --enable-R-shlib=yes 

which gives an error

 config.status: error: cannot find input file: `src/library/base/DESCRIPTION.in' 

then

 make 

which gives the same error as when trying to do this earlier.

Can you help me see where I made a mistake?

+8
r rstudio
source share
1 answer

make uninstall only make uninstall make install step, which usually copies the files from the compilation directory to dir (s) on the system, if necessary, and puts the binaries in say /usr/bin so that they are in the path. If you want to clean the directory in which you made the previous compiler, use make clean (or make distclean ), I forgot that the difference is now up to R, but the convention is that it must return the dir for the assembly to -configure, pre- build state.).

You also usually don't want to build in a directory that contains R sources (which ./configure assumes you do).

+8
source share

All Articles