简体   繁体   中英

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. I can successfully go to the DeployR landing page and checked diagnostics tab, and it says DeployR is running, and appears fine.

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)

The documentation is not clear for package management: https://deployr.revolutionanalytics.com/documents/admin/r-package-mgmt/

It says: "Manually run this R script on a DeployR grid node." 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.

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.

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

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

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.

Here is a list of some most frequently used development packages for DeployR that I use on Amazon Linux AMI:

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

Since Amazon Linux is based on RedHat distro, these package names should fit to you.

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