簡體   English   中英

如何在 AWS EMR 5.29 版中安裝 RcppArmadillo

[英]How to install RcppArmadillo in AWS EMR version 5.29

我正在嘗試在 AWS EMR 5.29 版中使用 sparkR shell 安裝 RcppArmadillo。

這是我的sessionInfo() -

R version 3.4.1 (2017-06-30)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Amazon Linux AMI 2018.03

Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] SparkR_2.4.4

loaded via a namespace (and not attached):
[1] compiler_3.4.1 tools_3.4.1 

這是我安裝此軟件包的代碼-

package_path <- "/home/sma/"
install.packages('RcppArmadillo',repos = "http://cran.us.r-project.org",lib=package_path, dependencies = TRUE)

這是我執行install.packages()語句時遇到的失敗 -

 SparkSession available as 'spark'.
* installing *source* package ‘RcppArmadillo’ ...
** package ‘RcppArmadillo’ successfully unpacked and MD5 sums checked
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ -m64 accepts -g... yes
checking how to run the C++ preprocessor... g++ -m64 -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ -m64 accepts -g... (cached) yes
checking whether we have a suitable tempdir... /tmp
checking whether R CMD SHLIB can already compile programs using OpenMP... no
checking whether g++ version is sufficient... yes, with OpenMP as version 7.2.1
checking for macOS... no
checking LAPACK_LIBS... R-supplied partial LAPACK found
configure: WARNING: Some complex-valued LAPACK functions may not be available
checking for OpenMP... found and suitable
configure: creating ./config.status
config.status: creating inst/include/RcppArmadilloConfigGenerated.h
config.status: creating src/Makevars
** libs
g++ -m64 -std=gnu++11 -I/usr/include/R -DNDEBUG  -I"/home/sma/Rcpp/include" -I/usr/local/include  -I../inst/include -fopenmp -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c RcppArmadillo.cpp -o RcppArmadillo.o
In file included from ../inst/include/RcppArmadilloForward.h:49:0,
                 from ../inst/include/RcppArmadillo.h:31,
                 from RcppArmadillo.cpp:22:
../inst/include/armadillo:70:12: fatal error: omp.h: No such file or directory
   #include <omp.h>
            ^~~~~~~
compilation terminated.
make: *** [RcppArmadillo.o] Error 1
ERROR: compilation failed for package ‘RcppArmadillo’
* removing ‘/home/sma/RcppArmadillo’

The downloaded source packages are in
    ‘/mnt/tmp/RtmpQmFZ4n/downloaded_packages’
Warning messages:
1: In install.packages("RcppArmadillo", repos = "http://cran.us.r-project.org",  :
  installation of package ‘slam’ had non-zero exit status
2: In install.packages("RcppArmadillo", repos = "http://cran.us.r-project.org",  :
  installation of package ‘RcppArmadillo’ had non-zero exit status

您正在運行“R 版本 3.4.1 (2017-06-30)”,因此我建議您選擇一個類似年份的 RcppArmadillo 版本。 CRAN存檔目錄(按日期排序)表明 RcppArmadillo_0.7.960.1.0 版本是在 2017 年 8 月 17 日發布的,或者是在您在這里發布的(古老的)R 版本之后不久發布的。

你當然可以加入現在而不是過去,但為此我推薦當前的 R 4.0.3 以及當前的,而不是幾年前的操作系統版本。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM