无法在AWS EMR上安装R / rmr2

时间:2014-04-07 23:11:15

标签: r amazon-web-services amazon-emr bootstrapping

花了大约一周时间尝试在AWS-EMR上安装R和rmr2,我转向大家帮忙。我的bootstrap脚本成功安装了R 2.14.1-1~lennycran.0(感谢JD Long的博客)。当我尝试安装rmr2时,我遇到了经典的依赖问题。似乎我必须安装Rcpp,RJSONIO,bitops,digest等软件包。因为只有较旧的Rcpp与R 2.14.1一起使用,所以我正在下载一个命名版本并安装它。多久了,我不知道 - 我随机尝试了几个版本,0.8.9工作了。我会再进行一些打击和试验。

sudo curl -o Rcpp.tar.gz http://cran.us.r-project.org/src/contrib/Archive/Rcpp/Rcpp_0.8.9.tar.gz
sudo R CMD INSTALL Rcpp.tar.gz

现在我应该安装其余的依赖项(How?)

最终将安装rmr2。我使用以下脚本,当然失败了 -

sudo wget --no-check-certificate -o rmr2.tar.qz -S -T 10 -t 5 http://goo.gl/dvBric
sudo R CMD INSTALL rmr2.tar.gz

我的问题是 -

用于安装其余依赖项的简单引导脚本应该是什么(" RJSONIO"," bitops"," digest"," functional& #34;," stringr"," plyr"," reshape2"," caTools")?我是否还要担心这些软件包的兼容性?

这是我完整的bootstrap.sh代码 -

#!/bin/bash

#debian R upgrade

gpg --keyserver pgpkeys.mit.edu --recv-key 06F90DE5381BA480
gpg -a --export 06F90DE5381BA480 | sudo apt-key add -
echo "deb http://streaming.stat.iastate.edu/CRAN/bin/linux/debian lenny-cran/" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get -t lenny-cran install --yes --force-yes r-base r-base-dev

sudo curl -o rmr2.tar.gz http://goo.gl/dvBric
sudo R CMD INSTALL rmr2.tar.gz <<<< Does not go beyond this.

set -e
bucket=muxxx-bisxxx-bucket
path=input.tar.gz
wget -S -T 10 -t 5 http://$bucket.s3.amazonaws.com/$path
mkdir -p /home/hadoop/contents
tar -C /home/hadoop/contents -xzf input.tar.gz

export HADOOP_CMD=/home/hadoop/bin/hadoop
export HADOOP_STREAMING=/home/hadoop/contrib/streaming/hadoop_streaming.jar

/home/hadoop/bin/hadoop fs -mkdir /home/hadoop/contents
/home/hadoop/bin/hadoop fs -put /home/hadoop/contents/* /home/hadoop/contents/

1 个答案:

答案 0 :(得分:0)

我手头的问题没解决,但我找到了方向。在安装R 2.14.1之后和安装rmr2之前,我在引导脚本中添加了以下代码行 -

sudo Rscript -e 'install.packages(c("rJava", "Rcpp", "RJSONIO", "bitops", "digest", "functional", "stringr", "plyr", "reshape2", "caTools"), repos="http://ftp.heanet.ie/mirrors/cran.r-project.org/")'

目前引导过程在plyr发生故障,我猜,这是由于我的旧版Rcpp所致。

我正在结束这篇文章。