本文介绍了R程序包,海湾合作委员会,并BLAS在Amazon EC2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图安装RTextTools对R在我的Amazon EC2实例。我使用的是 - [R 3.1.1。 (安装了2014年7月10日)与亚马逊公司的Linux AMI。我开放的R以root权限和尝试以下操作:

I am trying to install RTextTools for R on my Amazon EC2 instance. I'm using R 3.1.1. (installed 2014-07-10) with Amazon's Linux AMI. I open R with root privileges and try the following:

> install.packages('RTextTools')
Installing package into ‘/root/R/x86_64-redhat-linux-gnu-library/3.1’
(as ‘lib’ is unspecified)
also installing the dependencies ‘slam’, ‘tm’, ‘maxent’

trying URL 'http://cran.stat.ucla.edu/src/contrib/slam_0.1-32.tar.gz'
Content type 'application/x-tar' length 46672 bytes (45 Kb)
opened URL
==================================================
downloaded 45 Kb

trying URL 'http://cran.stat.ucla.edu/src/contrib/tm_0.6-1.tar.gz'
Content type 'application/x-tar' length 510444 bytes (498 Kb)
opened URL
==================================================
downloaded 498 Kb

trying URL 'http://cran.stat.ucla.edu/src/contrib/maxent_1.3.3.1.tar.gz'
Content type 'application/x-tar' length 395873 bytes (386 Kb)
opened URL
==================================================
downloaded 386 Kb

trying URL 'http://cran.stat.ucla.edu/src/contrib/RTextTools_1.4.2.tar.gz'
Content type 'application/x-tar' length 448187 bytes (437 Kb)
opened URL
==================================================
downloaded 437 Kb

* installing *source* package ‘slam’ ...
** package ‘slam’ successfully unpacked and MD5 sums checked
** libs
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG  -I/usr/local/include    -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic  -c apply.c -o apply.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG  -I/usr/local/include    -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic  -c grouped.c -o grouped.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG  -I/usr/local/include    -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic  -c sparse.c -o sparse.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG  -I/usr/local/include    -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic  -c util.c -o util.o
gcc -m64 -std=gnu99 -shared -L/usr/local/lib64 -o slam.so apply.o grouped.o sparse.o util.o -L/usr/lib64/R/lib -lRblas -lgfortran -lm -lquadmath -L/usr/lib64/R/lib -lR
/usr/bin/ld: cannot find -lRblas
collect2: error: ld returned 1 exit status
make: *** [slam.so] Error 1
ERROR: compilation failed for package ‘slam’
* removing ‘/root/R/x86_64-redhat-linux-gnu-library/3.1/slam’
ERROR: dependency ‘slam’ is not available for package ‘tm’
* removing ‘/root/R/x86_64-redhat-linux-gnu-library/3.1/tm’
ERROR: dependency ‘tm’ is not available for package ‘maxent’
* removing ‘/root/R/x86_64-redhat-linux-gnu-library/3.1/maxent’
ERROR: dependencies ‘tm’, ‘maxent’ are not available for package ‘RTextTools’
* removing ‘/root/R/x86_64-redhat-linux-gnu-library/3.1/RTextTools’

The downloaded source packages are in
    ‘/tmp/RtmpkiBUCd/downloaded_packages’
Warning messages:
1: In install.packages("RTextTools") :
  installation of package ‘slam’ had non-zero exit status
2: In install.packages("RTextTools") :
  installation of package ‘tm’ had non-zero exit status
3: In install.packages("RTextTools") :
  installation of package ‘maxent’ had non-zero exit status
4: In install.packages("RTextTools") :
  installation of package ‘RTextTools’ had non-zero exit status

有出现的问题是,没有Rblas。我有:

It appears that the problem is that there is no Rblas. I have:

  • 在尝试安装满贯,TM和MAXENT单独
  • 在安装确认GCC
  • 在安装了其它的R程序包(Zelig,GGPLOT2),没有问题
  • 阅读这些 <一个href="http://stackoverflow.com/questions/16710047/usr-bin-ld-cannot-find-lnameofthelibrary?lq=1">SO 问题
  • 在试图了解在此输入链接的描述上的BLAS R文件
  • Tried installing slam, tm, and maxent separately
  • Confirmed gcc is installed
  • Installed other R packages (Zelig, ggplot2) with no problem
  • Read these SO questions.
  • Tried to understand enter link description herethe R documentation on BLAS

我认为这个问题为R寻找一个不同版本的BLAS比GCC使用。但我真的不知道。我将preFER不重新安装的R,因为它是根据在服务器上大量使用。

I think the problem is R looking for a different version of BLAS than gcc uses. But I really have no idea. I would prefer not to have to reinstall R, as it is under heavy use on the server.

我该怎么办?

推荐答案

想通了。亚马逊的默认机映像使用阿特拉斯BLAS。当所有的默认安装ř指向,但RTextTools预计普通BLAS。我卸载阿特拉斯,卸载R,重新安装R,和当时能够安装RTextTools。

Figured it out. Amazon's default machine image uses the Atlas BLAS. R points to that when installed with all defaults, but RTextTools expects the ordinary BLAS. I uninstalled Atlas, uninstalled R, reinstalled R, and was then able to install RTextTools.

这篇关于R程序包,海湾合作委员会,并BLAS在Amazon EC2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 12:06