Installing the R interpeter and R as a shared library uder the same tree

。_饼干妹妹 提交于 2019-12-22 04:18:06

问题


I am a bit confused about how to install R (via compilation) as a shared library.

The instructions here (Rpy2) say that I should do the following:

  # <go to the R source directory>
  make distclean
  ./configure --enable-R-shlib
  make
  make install

but the first make (make distclean) would remove any previous installation of R under the same directory tree (e.g. the contents of the bin folder).

What if I want to use the same installation for the R interpreter and the shared libraries? For example, say I want to use the interpreter to install R packages, and then the shared library of the installation to call R (and those packages) from Rpy2.

Otherwise, how can I install R packages for use through Rpy2?


回答1:


./configure --enable-R-shlib

Will tell to build R's shared libraries in addition to what is normally built (the executable, the documentation, etc...)

Also

make install

will install R (default is /usr/local). This is where you'll want to find your R executable. Calling make distclean will only affect the build directory, not the installed R.



来源:https://stackoverflow.com/questions/13224871/installing-the-r-interpeter-and-r-as-a-shared-library-uder-the-same-tree

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!