Support Questions
Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

Environment variable HADOOP_CMD must be set before loading package rhdfs Error: loading failed

Expert Contributor

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

I get this error when trying to install package rhdfs in R studio.

I am on centos 6.5.

1 ACCEPTED SOLUTION

@sameer lail

Please set HADOOP_CMD variable inside R before hdfs call.

Sys.setenv("HADOOP_CMD"="/usr/hdp/current/hadoop-client/bin/hadoop") 

View solution in original post

1 REPLY 1

@sameer lail

Please set HADOOP_CMD variable inside R before hdfs call.

Sys.setenv("HADOOP_CMD"="/usr/hdp/current/hadoop-client/bin/hadoop")