简体   繁体   English

如何在Linux上运行的DeployR服务器上安装R软件包(托管在Amazon EC2上)?

[英]How to install R packages on DeployR server running on Linux (hosted on Amazon EC2)?

I successfully installed DeployR on Redhat Linux that is being hosted on Amazon EC2 instance. 我成功地在Amazon EC2实例上托管的Redhat Linux上安装了DeployR。 I can successfully go to the DeployR landing page and checked diagnostics tab, and it says DeployR is running, and appears fine. 我可以成功转到DeployR登录页面并检查诊断选项卡,它说DeployR正在运行,并且显示正常。

I've tested a simple R script and runs fine on DeployR, but now I need to install RJDBC package: install.packages("RJDBC",dep=TRUE) 我已经测试了一个简单的R脚本并在DeployR上运行正常,但现在我需要安装RJDBC包:install.packages(“RJDBC”,dep = TRUE)

The documentation is not clear for package management: https://deployr.revolutionanalytics.com/documents/admin/r-package-mgmt/ 包裹管理的文档不明确: https//deployr.revolutionanalytics.com/documents/admin/r-package-mgmt/

It says: "Manually run this R script on a DeployR grid node." 它说:“在DeployR网格节点上手动运行此R脚本。” But not sure how to run a script on a grid node. 但不确定如何在网格节点上运行脚本。 How do I access a grid node? 如何访问网格节点?

In general, need guidance on how to install packages for DeployR. 通常,需要有关如何为DeployR安装软件包的指导。

If you have only one server for your DeployR installation, then "grid node" means this your server - just go there via SSH (or any other way that allows you to access to DeployR stuff) and perform needed actions. 如果您的DeployR安装只有一台服务器,那么“网格节点”意味着您的服务器 - 只需通过SSH(或任何其他允许您访问DeployR的方式)并执行所需的操作。

The most typical problem with DeployR on Linux is availability of development packages (those have -devel suffixes), that are required to compile and build R packages that DeployR gets from CRAN repository as source code (that's the main difference from Windows and Mac OSX that have pre-compiled package binaries). 在Linux上,DeployR最典型的问题是开发包(具有-devel后缀)的可用性,这些开发包是编译和构建DeployR从CRAN存储库获取的R包所需的源代码(这与Windows和Mac OSX的主要区别在于有预编译的包二进制文件)。

The most simple way is to look at RServe log (eg <deployr_home>/deployr/8.0.0/rserve/R/log ), find there error message(s) about unavailability of some library(-ies) (eg x or curl or smth else), then install needed development RPMs ( yum install xz-devel or yum install libcurl-devel for my example). 最简单的方法是查看RServe日志(例如<deployr_home>/deployr/8.0.0/rserve/R/log ),找到有关某些库( <deployr_home>/deployr/8.0.0/rserve/R/log )不可用的错误消息(例如xcurl或者其他),然后安装所需的开发RPM( yum install xz-develyum install libcurl-devel for my example)。

It's quite a challenge sometimes to find out a needed package name from error message. 有时从错误消息中找出所需的包名称是一个相当大的挑战。 To do so, you may use different ways, eg yum search command you have on RedHat-based distros, or http://rpm.pbone.net/ website to find a package name if you know some file name that should belong to it: eg if error message says curl-config: command not found then you may look for curl-config file in rpm.pbone.net and obtain a hint what a corresponding package name is. 为此,您可以使用不同的方式,例如您在基于RedHat的发行版上使用yum search命令,或者http://rpm.pbone.net/网站查找包名称,如果您知道应该属于它的某个文件名:例如,如果错误消息显示curl-config: command not found那么您可以在rpm.pbone.net中查找curl-config文件并获取相应包名称的提示。

Here is a list of some most frequently used development packages for DeployR that I use on Amazon Linux AMI: 以下是我在Amazon Linux AMI上使用的一些最常用的DeployR开发包的列表:

  • pcre-devel PCRE-devel的
  • xz-devel XZ-devel的
  • bzip2-devel bzip2的-devel的
  • zlib-devel zlib的-devel的
  • libicu-devel libicu-devel的
  • libstdc++-devel 的libstdc ++ - devel的
  • libcurl-devel 的libcurl-devel的
  • libxml2-devel 的libxml2-devel的

Since Amazon Linux is based on RedHat distro, these package names should fit to you. 由于Amazon Linux基于RedHat发行版,因此这些软件包名称应该适合您。

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

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