Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

SparkR on Zeppelin is giving an error


SparkR on Zeppelin is giving an error

I have installed R on each of the 3 nodes of HDP 2.6 cluster. I can run R script on sparkR command prompt on the server. In Zeppelin, I get following error with

Zeppelin interpreter config parameter "zeppelin.R.knitr" to true:

Error in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/usr/lib64/R/library/stringi/libs/': /usr/lib64/R/library/stringi/libs/ invalid ELF header

Here is the sample SparkR code I execute on Zeppelin


foo <- TRUE 
bare <- c(1, 2.5, 4) 
double <- 15.0 

I have RHEL OS and running a 3 node HDP 2.6 cluster. R installation "yum install R" did n't install optional packages such as knitr etc. So I tried to install optional packages at server R command line following script:

> install.packages('knitr', repos = '')
Installing package into ‘/usr/lib64/R/library’
(as ‘lib’ is unspecified)
Warning: unable to access index for repository
  cannot open URL ''
Warning message:
package ‘knitr’ is not available (for R version 3.4.2)
> Sys.getenv("http_proxy")
[1] ""

got error even with proxy setting. So I went and downloaded binary from (

OS X El Capitan binaries:r-release: stringi_1.1.6.tgz

), and manually copied to "/usr/lib64/R/library". After that Zeppelin spark2.r code error prompted me to repeat the process for other packages in stringr, and stringi. After adding stringi I get error, that I 'm not sure how to solve it.

I can set Zeppelin interpreter config parameter "zeppelin.R.knitr" to false, and Zeppelin works, but it has limited display with this setting false. How do I fix this problem?

Don't have an account?
Coming from Hortonworks? Activate your account here