简体   繁体   English

如何在离线服务器上安装H2O R软件包?

[英]How to install H2O R package on an offline server?

I had to install H2O R package on an offline server. 我必须在脱机服务器上安装H2O R软件包。 I created a local repo via miniCRAN and tried to install the package from it but installation failed with this error: 我通过miniCRAN创建了本地存储库,并尝试从中安装软件包,但安装失败并出现以下错误:

Error in download.file(md5_url, destfile = md5_file, mode = "w", cacheOK = FALSE,  :
  cannot open URL 'http://s3.amazonaws.com/h2o-release/h2o/rel-vajda/3/Rjar/h2o.jar.md5'
Error : unable to load R code in package ‘h2o’
ERROR: lazy loading failed for package ‘h2o’
* removing ‘/usr/lib64/R/library/h2o’

I circumvented this by manual transferring of installed binaries from an online server but this is obviously just a workaround. 我通过从在线服务器手动传输已安装的二进制文件来绕过此问题,但这显然只是一种解决方法。 So is there a normal way to install H2O R package on an offline server? 那么,是否有正常的方法在脱机服务器上安装H2O R软件包?

The R install package is embedded in the zip download file. R安装包嵌入在zip下载文件中。

This will work, assuming all the dependencies have also been downloaded and installed. 假设还已经下载并安装了所有依赖项,那么这将起作用。

(Of course, substitute the specific version that you want.) (当然,请替换为所需的特定版本。)

wget https://h2o-release.s3.amazonaws.com/h2o/rel-weierstrass/2/h2o-3.14.0.2.zip
unzip h2o-3.14.0.2.zip 
cd h2o-3.14.0.2
cd R
R CMD INSTALL h2o_3.14.0.2.tar.gz 

You have to have h2o.jar already downloaded. 您必须已经下载了h2o.jar

Then set environment variable like so: 然后像这样设置环境变量:

Sys.setenv(H2O_JAR_PATH="_your_h2o_installation_path_/h2o.jar").

This worked for me. 这对我有用。

First download the h2o package archive and get the Jar file then set up H2O_JAR_PATH using this command 首先下载h2o软件包归档文件并获取Jar文件,然后使用此命令设置H2O_JAR_PATH

Sys.setenv(H2O_JAR_PATH="/home/hadoop/R/h2o.jar")

Finally, 最后,

install.packages("~/R/h2o_3.20.0.8.tar.gz", repos = NULL, type = "source")
library(h2o)

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

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