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

2020-02-07 02:43发布

问题:

I am trying to install R with --enable-R-shlib, so that I can run rstudio with that version,

cd /mnt/data2tb/disk/soft/R-3.0.1
./configure --with-x=yes --enable-R-shlib

but I got this error:

/usr/bin/ld: ../appl/dchdc.o: relocation R_X86_64_32 against `.rodata'
can not be used when making a shared object; recompile with -fPIC
../appl/dchdc.o: could not read symbols: Bad value collect2: ld
returned 1 exit status make[3]: *** [libR.so] Error 1 make[3]: Leaving
directory `/mnt/data2tb/disk/soft/R-3.0.1/src/main' make[2]: *** [R]
Error 2 make[2]: Leaving directory
/mnt/data2tb/disk/soft/R-3.0.1/src/main make[1]: *** [R] Error 1
make[1]: Leaving directory `/mnt/data2tb/disk/soft/R-3.0.1/src' make:
*** [R] Error 1

Any suggestions? Thanks in advance :)

回答1:

Other than changing directory as suggested by Martin Morgan in the comment, note that you can do

make clean

to clean the binaries from the previous compilation. This will save you from needing to copy the files to another folder.



标签: r rstudio