简体   繁体   English

如何在Linux集群上安装R?

[英]How to install R on a linux cluster?

I use a cluster (OS is Linux) which does not have R. I would like to install R in my personal folders so that I can just do 我使用的是没有R的集群(操作系统是Linux)。我想在我的个人文件夹中安装R ,这样我才能做到

Rscript example.R arg1 arg2

How should I install R on this cluster knowing that I don't have admin rights? 知道我没有管理员权限,我应该如何在这个集群上安装R?

How can I then manage the packages? 我怎样才能管理包裹?

I'm not sure this is on-topic, but: all you really have to do is 我不确定这是关于主题的,但是:你真正需要做的就是

  • download the R source tarball from CRAN; 从CRAN下载R源码tarball; unpack it somewhere in your file space 将其解压缩到文件空间中的某个位置
  • create an r-build directory at the same level of the hierarchy (not technically necessary, but it's better practice to keep the source and build directories separate) 在层次结构的同一级别创建一个r-build目录(技术上不是必需的,但最好将源和构建目录分开)
  • create an installation directory (say ~/r_install ) somewhere sensible within your file space 在你的文件空间中创建一个合理的安装目录(比如~/r_install
  • cd to the source directory; cd到源目录; tools/rsync-recommended
  • cd to the build directory cd到build目录
  • ../[srcdir]/configure --prefix=~/r_install
  • make (to build the binaries) make (构建二进制文件)
  • make install (to move everything where it belongs; not technically necessary, as you can run R from the build directory) make install (移动它所属的所有内容;技术上不必要,因为你可以从构建目录运行R)

Where this may get hairy is with all of the system requirements for R (LaTeX, Java, bzip2, etc. etc. ...) it is theoretically possible to download all this stuff and install it in your own file space, but it starts to get sufficiently tedious that it will be easier to beg your sysadmin to install at least the dependencies for you ... 对于R(LaTeX,Java,bzip2等等)的所有系统要求,这可能会变得毛茸茸, 理论上可以下载所有这些东西并将其安装在您自己的文件空间中,但它开始让你的系统管理员更容易为你安装至少依赖项...

as @Hack-R points out the basics of this answer are already present on Unix & Linux stackexchange , although my answer is a little more detailed ... 正如@ Hack-R指出这个答案的基础知识已经存在于Unix和Linux stackexchange上 ,尽管我的答案更加详细......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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