我在安装rJava包时面临编译错误 我有R版本和java版本。请任何人都知道如何解决以下编译错误并在linux中安装rJava包
[root@localhost ~]# java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
[root@localhost ~]# R --version
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (64-bit)
错误日志:
Warning: R include directory is empty -- perhaps need to install R-devel.rpm or similar
gcc -m64 -I/usr/include/R -DNDEBUG -I. -I/usr/java/latest/include -I/usr/java/latest/include/linux -I/usr/local/include -fpic -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -c Rglue.c -o Rglue.o
In file included from Rglue.c:2:0:
rJava.h:23:15: fatal error: R.h: No such file or directory
compilation terminated.
/usr/lib64/R/etc/Makeconf:132: recipe for target 'Rglue.o' failed
make: *** [Rglue.o] Error 1
ERROR: compilation failed for package ‘rJava’
* removing ‘/usr/lib64/R/library/rJava’
The downloaded source packages are in
‘/tmp/RtmpMX8OgU/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("rJava") :
installation of package ‘rJava’ had non-zero exit status