请帮助我,我尝试在R中安装此软件包,我的操作系统是linux ubuntu 15.04
devtools
rjava
但是我遇到了一些错误,例如,当我安装devtools
时Warning in install.packages :
installation of package ‘git2r’ had non-zero exit status
Warning in install.packages :
installation of package ‘devtools’ had non-zero exit status
and when i install rjava
checking for gcc... gcc -std=gnu99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for string.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
configure: checking whether gcc -std=gnu99 supports static inline...
yes
checking whether setjmp.h is POSIX.1 compatible... yes
checking whether sigsetjmp is declared... yes
checking whether siglongjmp is declared... yes
checking Java support in R... present:
interpreter : '/usr/bin/java'
archiver : '/usr/bin/jar'
compiler : '/usr/bin/javac'
header prep.: '/usr/bin/javah'
cpp flags : '-I/usr/lib/jvm/java-7-openjdk-i386/jre/../include'
java libs : '-L/usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/client -ljvm'
checking whether Java run-time works...
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
yes
checking whether -Xrs is supported...
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
yes
checking whether JNI programs can be compiled...
configure: error: Cannot compile a simple JNI program. See config.log for details.
Make sure you have Java Development Kit installed and correctly registered in R.
If in doubt, re-run "R CMD javareconf" as root.
ERROR: configuration failed for package ‘rJava’
* removing ‘/home/dave/R/i686-pc-linux-gnu-library/3.1/rJava’
Warning in install.packages :
installation of package ‘rJava’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmp86RnJ1/downloaded_packages’
当然在问这个问题之前我在这个网站上发现了类似的问题,但是给出建议并没有帮助我 我用过这个
sudo apt-get build-dep libxml2-dev
sudo apt-get install r-cran-rjava
我应该怎么做才能安装所需的软件包。这个问题关注和其他软件包如jgr,deducer,rweka