简体   繁体   中英

R installation for RHive and/or RStudio(“--enable-R-shlib”)

I suspect I am having a problem with my R installation, something that has to do with "--enable-R-shlib".

Can someone explain if this is something that I can fix using apt-get?

More specifically:

I am having trouble getting installing the RHive package. I Installed R from scratch, following the instructions in (for example): http://cran.ru.ac.za/bin/linux/ubuntu/

basically, just doing:

sudo apt-get update
sudo apt-get install r-base
sudo apt-get install r-base-dev

Next I opened R and installed rJava:

install.packages("rJava")

which worked fine. Next I tried installing RHive:

install.packages("RHive")

at which point the installation fails with the following message:

* installing *source* package ‘Rserve’ ...
** package ‘Rserve’ successfully unpacked and MD5 sums checked
checking whether to compile the server... yes
configure: error: R was configured without --enable-R-shlib or --enable-R-static-lib

*** Rserve requires R (shared or static) library.                       ***
*** Please install R library or compile R with either --enable-R-shlib  ***
*** or --enable-R-static-lib support                                    ***

What Should I Do?

Also, I installed RStudio and this fails at startup with a related message:

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

All of which leads me to believe it is all related to the same problem. Weird thing is, I followed the same procedure on a different machine, and all seems to work fine...

I had the same problem.
In my case I changed R_HOME like this Sys.setenv(R_HOME="/usr/lib/R")

R, as well as r-cran-rjava and r-cran-rserve are available for Debian and Ubuntu as part of the basic distribution.

Can you not use those packages? They certainly work for me and many, many other people at least as far as RStudio is concerned -- I have not tried RHive myself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM