h2o以前的版本安装错误,说h2o.jar下载失败

时间:2017-05-27 19:40:18

标签: r package h2o

我的模型依赖于R包h2o的版本3.10.0.6。在新机器中,我尝试从源文件h2o_3.10.0.6.tar.gz

进行安装
install.packages("h2o_3.10.0.6.tar.gz", repos=NULL, type="source")

10分钟后,它回来了这个投诉,

Performing one-time download of h2o.jar from
 http://s3.amazonaws.com/h2o-release/h2o/rel-turing/6/Rjar/h2o.jar 
(This could take a few minutes, please be patient...)
Warning in download.file(url = h2o_url, destfile = temp_file, mode = "wb",  :
  downloaded length 60135652 != reported length 62422402
Warning in download.file(url = h2o_url, destfile = temp_file, mode = "wb",  :
  URL 'http://s3.amazonaws.com/h2o-release/h2o/rel-turing/6/Rjar/h2o.jar': status was 'Failure when receiving data from the peer'
Error in download.file(url = h2o_url, destfile = temp_file, mode = "wb",  : 
  download from 'http://s3.amazonaws.com/h2o-release/h2o/rel-turing/6/Rjar/h2o.jar' failed

我知道它是旧版本,因此JVM可能已被删除。但是h2o的人可能会离开旧的JVM,所以像我这样的人仍然可以使用以前的版本。

1 个答案:

答案 0 :(得分:1)

我无法复制您的错误。我刚刚从CRAN存档中下载了h2o_3.10.0.6.tar.gz文件,并且能够正确安装它,所以看起来它必须是您的终端上的互联网连接问题。刚刚做了这个:

> install.packages("h2o_3.10.0.6.tar.gz", repos=NULL, type="source")
* installing *source* package ‘h2o’ ...
** package ‘h2o’ successfully unpacked and MD5 sums checked
** R
** demo
** inst
** preparing package for lazy loading
Performing one-time download of h2o.jar from
     http://s3.amazonaws.com/h2o-release/h2o/rel-turing/6/Rjar/h2o.jar
(This could take a few minutes, please be patient...)
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (h2o)

还有一些其他方法可以重新安装旧版本的 h2o R包。如果是CRAN发行版,您可以使用版本包安装任何旧版本的CRAN包:

install.packages("versions")
install.versions("h2o", versions = "3.10.0.6")

任何稳定版本的H2O都可以从它的发布页面下载。 3.10.0.6版本页面为here,如果您单击“在R中安装”选项卡,它将显示从R安装该版本H2O的命令:

install.packages("h2o", type="source", repos=(c("https://h2o-release.s3.amazonaws.com/h2o/rel-turing/6/R")))