将R Interpeter和R作为共享库安装在同一棵树上 [英] Installing the R interpeter and R as a shared library uder the same tree

查看:91
本文介绍了将R Interpeter和R作为共享库安装在同一棵树上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对如何将R(通过编译)安装为共享库感到困惑.

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

,但第一个make(make distclean)会删除同一目录树下任何以前的R安装(例如bin文件夹的内容).

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).

如果我想对R解释器和共享库使用相同的安装,该怎么办?例如,假设我要使用解释器安装R软件包,然后使用安装的共享库从Rpy2调用R(和那些软件包).

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.

否则,如何安装R软件包以通过Rpy2使用?

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

推荐答案

./configure --enable-R-shlib

除了正常构建的内容(可执行文件,文档等)之外,还会告诉您构建R的共享库

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

make install

将安装R(默认为/usr/local).这是您要查找R可执行文件的地方.调用make distclean仅会影响构建目录,而不会影响已安装的R.

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.

这篇关于将R Interpeter和R作为共享库安装在同一棵树上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆