1

RWeka が必要な Fselector パッケージをインストールしたいのですが、RWeka をインストールすると次のエラーが表示されます。

Error : .onLoad failed in loadNamespace() for 'RWeka', details:
call: .jcall("java/lang/System", "V", "setOut", out)
error: method setOut with signature (Ljava/io/PrintStream;)V not found
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/gaurav/R/x86_64-pc-linux-gnu-library/3.3/RWeka’
Warning in install.packages :
installation of package ‘RWeka’ had non-zero exit status
ERROR: dependency ‘RWeka’ is not available for package ‘FSelector’
* removing ‘/home/gaurav/R/x86_64-pc-linux-gnu-library/3.3/FSelector’
Warning in install.packages :
installation of package ‘FSelector’ had non-zero exit status

私は同じことを検索し、jdk でいくつかの変更を行い、bashrc の jdk/bin へのパスを更新しましたが、何も機能しませんでした。

Session Info

R version 3.3.3 (2017-03-06)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.2 LTS

locale:
[1] LC_CTYPE=en_IN.UTF-8       LC_NUMERIC=C   LC_TIME=en_IN.UTF-8       
[4] LC_COLLATE=en_IN.UTF-8     LC_MONETARY=en_IN.UTF-8   LC_MESSAGES=en_IN.UTF-8   
[7] LC_PAPER=en_IN.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_IN.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] Rcpp_0.12.12     digest_0.6.12    mime_0.5         grid_3.3.3       plyr_1.8.4      
[6] R6_2.2.2         xtable_1.8-2     gtable_0.2.0     scales_0.4.1     ggplot2_2.2.1   
[11] rlang_0.1.1      lazyeval_0.2.0   brew_1.0-6       tools_3.3.3      munsell_0.4.3   
[16] Rook_1.1-1       shiny_1.0.4      httpuv_1.3.5     colorspace_1.3-2 htmltools_0.3.6 
[21] tibble_1.3.3    

誰でもこれで私を助けることができますか?

前もって感謝します

更新 1:@Nanov、手順に従いましたが、それでも同じエラーが発生しました。openjdk 8 があり、bashrc のパスを更新しました。「sudo R CMD javareconf」を使用すると、以下の情報が得られます。

gaurav@gaurav-ds:~$ sudo R CMD javareconf
Java interpreter : /usr/lib/jvm/java-8-oracle/jre/bin/java
Java version     : 1.8.0_131
Java home path   : /usr/lib/jvm/java-8-oracle/jre
Java compiler    : not present
Java headers gen.:
Java archive tool:

trying to compile and link a JNI program 
detected JNI cpp flags    : 
detected JNI linker flags : -L/usr/lib -ljvm
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time-D_FORTIFY_SOURCE=2 -g  -c conftest.c -o conftest.oconftest.c:1:17: fatal error: jni.h: No such file or directory
#include <jni.h>
             ^
compilation terminated.
/usr/lib/R/etc/Makeconf:132: recipe for target 'conftest.o' failed
make: *** [conftest.o] Error 1
Unable to compile a JNI program.
JAVA_HOME        : /usr/lib/jvm/java-8-oracle/jre
Java library path: 
JNI cpp flags    : 
JNI linker flags : 
Updating Java configuration in /usr/lib/R
Done.
4

1 に答える 1