简体   繁体   中英

Cannot install package data.table on AWS EC2

I cannot install package data.table on AWS EC2 instance. Below the error I have.

* 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’

I tried to create a MakeVars file (in .R folder) containing:

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

But it does not change anything. Maybe the paths of MakeVars file are wrong? Thanks !

EDIT:
在此处输入图片说明

Worked fine after doing in Centos:

sudo yum install R-devel

Thanks @Michael - sqlbot!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM