[英]R Packages, gcc, and BLAS on Amazon EC2
I am trying to install RTextTools for R on my Amazon EC2 instance. 我试图在我的Amazon EC2实例上安装R的RTextTools。 I'm using R 3.1.1.
我正在使用R 3.1.1。 (installed 2014-07-10) with Amazon's Linux AMI.
(已安装2014-07-10)与Amazon的Linux AMI。 I open R with root privileges and try the following:
我以root特权打开R并尝试以下操作:
> 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
It appears that the problem is that there is no Rblas. 看来问题在于没有Rblas。 I have:
我有:
I think the problem is R looking for a different version of BLAS than gcc uses. 我认为问题是R寻找与gcc使用不同的BLAS版本。 But I really have no idea.
但是我真的不知道。 I would prefer not to have to reinstall R, as it is under heavy use on the server.
我希望不必重新安装R,因为R在服务器上的使用量很大。
What do I do? 我该怎么办?
Figured it out. 弄清楚了。 Amazon's default machine image uses the Atlas BLAS.
亚马逊的默认机器映像使用Atlas BLAS。 R points to that when installed with all defaults, but RTextTools expects the ordinary BLAS.
当使用所有默认值安装时,R指向该目录,但是RTextTools需要普通的BLAS。 I uninstalled Atlas, uninstalled R, reinstalled R, and was then able to install RTextTools.
我卸载了Atlas,卸载了R,重新安装了R,然后能够安装RTextTools。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.