RevolutionAnalytics / RHadoop

RHadoop
https://github.com/RevolutionAnalytics/RHadoop/wiki
763 stars 278 forks source link

Error installing rmr2 on MAC Mavericks #197

Open yogeshpalrecha opened 10 years ago

yogeshpalrecha commented 10 years ago

install.packages("~/Downloads/rmr2_2.3.0.tar.gz", repos = NULL, type = "source"

  • ) Warning in install.packages : package ‘~/Downloads/rmr2_2.3.0.tar.gz’ is not available (for R version 2.14.2) Installing package(s) into ‘/Library/Frameworks/R.framework/Versions/2.14/Resources/library’ (as ‘lib’ is unspecified)
  • installing source package ‘rmr2’ ... \ libs *\ arch - i386 g++ -arch i386 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/i386 -I/usr/local/include /Library/Frameworks/R.framework/Resources/bin/Rscript -e "Rcpp:::CxxFlags()" -fPIC -g -O2 -c extras.cpp -o extras.o In file included from extras.cpp:15: In file included from ./extras.h:18: In file included from /Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rcpp/include/Rcpp.h:27: /Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rcpp/include/RcppCommon.h:130:10: fatal error: 'tr1/unordered_map' file not found

    include <tr1/unordered_map>

    ^ 1 error generated. make: *\ [extras.o] Error 1 ERROR: compilation failed for package ‘rmr2’

  • removing ‘/Library/Frameworks/R.framework/Versions/2.14/Resources/library/rmr2’ Warning in install.packages : installation of package ‘/Users/ypalrecha/Downloads/rmr2_2.3.0.tar.gz’ had non-zero exit status
piccolbo commented 10 years ago

Unfortunately, Revolution doesn't support RHadoop on OS X. Personally I use it and rmr works on it, but I am prevented from upgrading to Mavericks because of incompatibility with Qt, which I need for other reasons. So I will look into this eventually but you are the trailblazer right now. I hope someone else from the community can chip in. I assume you have XCode installed and that you tried this before switching to Mavericks with different results, correct?

On Sun, Nov 3, 2013 at 5:03 PM, yogeshpalrecha notifications@github.comwrote:

install.packages("~/Downloads/rmr2_2.3.0.tar.gz", repos = NULL, type = "source"

  • ) Warning in install.packages : package ‘~/Downloads/rmr2_2.3.0.tar.gz’ is not available (for R version 2.14.2) Installing package(s) into ‘/Library/Frameworks/R.framework/Versions/2.14/Resources/library’ (as ‘lib’ is unspecified)
  • installing source package ‘rmr2’ ... \ libs * arch - i386 g++ -arch i386 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/i386 -I/usr/local/include /Library/Frameworks/R.framework/Resources/bin/Rscript -e "Rcpp:::CxxFlags()" -fPIC -g -O2 -c extras.cpp -o extras.o In file included from extras.cpp:15: In file included from ./extras.h:18: In file included from /Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rcpp/include/Rcpp.h:27: /Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rcpp/include/RcppCommon.h:130:10: fatal error: 'tr1/unordered_map' file not found #include ^ 1 error generated. make: * [extras.o] Error 1 ERROR: compilation failed for package ‘rmr2’
  • removing ‘/Library/Frameworks/R.framework/Versions/2.14/Resources/library/rmr2’ Warning in install.packages : installation of package ‘/Users/ypalrecha/Downloads/rmr2_2.3.0.tar.gz’ had non-zero exit status

    — Reply to this email directly or view it on GitHubhttps://github.com/RevolutionAnalytics/RHadoop/issues/197 .

ambikasam commented 10 years ago

I am not sure if this is still a problem.

I have successfully installed rmr2 and rhdfs package on Mac Mavericks. R version installed in 3.0.2.

Details given below:

library("rmr2") Loading required package: Rcpp Loading required package: RJSONIO Loading required package: bitops Loading required package: digest Loading required package: functional Loading required package: stringr Loading required package: plyr Loading required package: reshape2

version _
platform x86_64-apple-darwin10.8.0
arch x86_64
os darwin10.8.0
system x86_64, darwin10.8.0
status
major 3
minor 0.2
year 2013
month 09
day 25
svn rev 63987
language R
version.string R version 3.0.2 (2013-09-25) nickname Frisbee Sailing


set the environment, install dependent packages and then install rmr2 and rhdfs.

Sys.setenv("HADOOP_CMD"="/Users/hadoop/HADOOP_INSTALL/hadoop/bin/hadoop") Sys.setenv("HADOOP_STREAMING"="/Users/hadoop/HADOOP_INSTALL/hadoop/share/hadoop/tools/lib/hadoop-streaming-2.2.0.jar") install.packages(c("rJava", "Rcpp", "RJSONIO", "bitops", "digest", "functional", "stringr", "plyr", "reshape2", caTools)) install.packages("/Users/hadoop/Downloaded-R-Packages/rmr2_2.3.0.tar.gz", repos = NULL, type="source") install.packages("/Users/hadoop/Downloaded-R-Packages/rhdfs_1.0.8.tar.gz", repos = NULL, type="source")

ViraSem commented 9 years ago

Did not work for me. My system is Mac OS X 10.7.5, my Hadoop version is 2.6.0, and R version is 3.1.2, rmr2 version is 3.3.0 I have installed the dependent packages:

install.packages(c("rJava", "Rcpp", "RJSONIO", "bitops", "digest", "functional", "stringr", "plyr", "reshape2", "dplyr", "R.methodsS3", "caTools", "Hmisc")) and set the environment: Sys.setenv("HADOOP_CMD"="/Users/virasemenova/Hadoop/bin/hadoop") Sys.setenv("HADOOP_STREAMING"="/Users/virasemenova/Hadoop/share/hadoop/tools/lib/hadoop-streaming-2.6.0.jar")

When I download the rmr2 package from https://github.com/RevolutionAnalytics/RHadoop/wiki/Downloads (rmr-3.3.0) , I get a .tar file in Downloads as opposed to .tar.gz (although I do not unpack it manually). Then, I move on to installation and run: R CMD INSTALL rmr /Users/virasemenova/Desktop/rmr2_3.3.0.tar

which returns an error:

I wish the instructions in previous post helped, but they did not . Is it because my versions of Mac OS X and R and Hadoop do not coincide exactly?

ViraSem commented 9 years ago

Today my problem was fixed! It appears, I needed to have 'make' installed on my Mac. 'make' is provided by https://developer.apple.com/xcode/downloads/ Xcode program, so once you have Xcode installed, the instructions of ambikasam are correct. For Mac OS X 10.7.5, Xcode version 4 works out. Thanks to Ista Zahn http://www.iq.harvard.edu/people/ista-zahn for help!