无法在AWS EC2上安装数据包data.table

时间:2018-05-20 21:27:42

标签: r amazon-ec2 data.table

我无法在AWS EC2实例上安装数据包data.table。 低于我的错误。

* installing *source* package ‘data.table’ ...
** package ‘data.table’ successfully unpacked and MD5 sums checked
** libs
Warning: R include directory is empty -- perhaps need to install R-devel.rpm or similar
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG   -I/usr/local/include  -fopenmp -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic  -c assign.c -o assign.o
In file included from assign.c:1:0:
data.table.h:1:15: fatal error: R.h: No such file or directory
 #include <R.h>
               ^
compilation terminated.
make: *** [assign.o] Error 1
ERROR: compilation failed for package ‘data.table’
* removing ‘/home/user1/R/x86_64-redhat-linux-gnu-library/3.4/data.table’
Warning in install.packages :
  installation of package ‘data.table’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpMTCCET/downloaded_packages’

我尝试创建一个MakeVars文件(在.R文件夹中),其中包含:

  

CC = / usr / bin / gcc64   
CXX = / usr / bin / g ++   
SHLIB_OPENMP_CFLAGS = -fopenmp

但它没有改变任何东西。也许MakeVars文件的路径是错误的? 谢谢!

编辑:
enter image description here

1 个答案:

答案 0 :(得分:0)

在Centos中做得很好:

sudo yum install R-devel

谢谢@Michael - sqlbot!