无法在centos中安装RHFS

c8ib6hqw  于 2021-06-03  发布在  Hadoop
关注(0)|答案(2)|浏览(541)
$ sudo R CMD INSTALL rhdfs

* installing to library ‘/usr/lib64/R/library’
* installing *source* package ‘rhdfs’ ...
**R
**inst
**preparing package for lazy loading
**help
***installing help indices

  converting help for package ‘rhdfs’
    finding HTML links ... done
    hdfs-file-access                        html  
    hdfs-file-manip                         html  
    hdfs.defaults                           html  
    hdfs.file-level                         html  
    initialization                          html  
    rhdfs                                   html  
    text.files                              html  

**building package indices
**testing if installed package can be loaded

Error : .onLoad failed in loadNamespace() for 'rhdfs', details:
  call: fun(libname, pkgname)
  error: Environment variable HADOOP_CMD must be set before loading package rhdfs
Error: loading failed
Execution halted
ERROR: loading failed

* removing ‘/usr/lib64/R/library/rhdfs’

我试过做很多次迭代,仍然没有成功。iam无法安装rhdfs和rmr2。我已经在cludera的r环境中设置了hadoop\u cmd、java\u home、path并安装了rjava。我根本无法加载RHFS。请帮助这个,或者我应该卸载一切从r-r,工作室和重新安装。请帮忙。。
当我尝试在r中安装rhdfs时,会出现以下错误:

> install.packages("rhdfs")
Installing package into ‘/home/supstat/R/x86_64-unknown-linux-gnu-library/2.13’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘rhdfs’ is not available (for R version 3.1.0)
eblbsuwk

eblbsuwk1#

在.bashrc文件的末尾添加以下行export ld_library_path=“/usr/lib/jvm/java-8-oracle/jre/lib/amd64/server”
源代码的bashrc文件或简单地关闭终端并打开一个新的
$r命令javareconf-e
美元
在r中运行以下命令:
sys.setenv(hadoop\u cmd=“/home//hadoop-2.5.0-cdh5.3.2/bin/hadoop”)sys.setenv(hadoop\u streaming=“/home//hadoop-2.5.0-cdh5.3.2/bin/hadoop”)install.packages(“/home//downloads/rhbase\u 1.2.1.tar.gz”,repos=null,type=“source”)
这是假设rhbase_1.2.1.tar.gz位于home目录中的downloads目录下

yr9zkbsy

yr9zkbsy2#

我在尝试安装rhadoop时遇到了几个问题,所有这些问题都与rjava有关。导出 HADOOP_CMD 以及 HADOOP_STREAMING 变量。之后,您需要告诉r library path指向java安装的位置:

export LD_LIBRARY_PATH=/usr/lib/jvm/java-7-oracle/jre/lib/amd64/server

然后,需要运行以下命令:

R CMD javareconf -e

之后,您应该能够安装rhdfs和rmr2。如果我没记错的话,您需要在安装rhdfs之前安装rmr2,或者可能是另一种方式。
编辑:尝试对其进行配置并从内部安装r:

Sys.setenv(HADOOP_CMD="the same value you used outside R")
Sys.setenv(HADOOP_STREAMING="same as above")
install.packages("rhdfs_1.0.8.tar.gz", repos=NULL, type="source")

相关问题