我正在尝试将RJAVA库安装在已安装R,Python和Jupyter的Ubuntu容器中。
我已经安装了jdk,这是我执行此操作时得到的信息:
sudo R CMD javareconf
root@071867e6c536:~# sudo R CMD javareconf
Java interpreter : /usr/lib/jvm/default-java/bin/java
Java version : 10.0.2
Java home path : /usr/lib/jvm/default-java
Java compiler : /usr/lib/jvm/default-java/bin/javac
Java headers gen.:
Java archive tool: /usr/lib/jvm/default-java/bin/jar
trying to compile and link a JNI program
detected JNI cpp flags : -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
detected JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux -fpic -g -O2 -fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c conftest.c -o conftest.o
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o conftest.so conftest.o -L/usr/lib/jvm/default-java/lib/server -ljvm -L/usr/lib/R/lib -lR
JAVA_HOME : /usr/lib/jvm/default-java
Java library path: $(JAVA_HOME)/lib/server
JNI cpp flags : -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
Updating Java configuration in /usr/lib/R
Done.
但是,当我在Jupyter中使用install.packages(“ rJava”)时,出现此错误:
Installing package into ‘/usr/local/spark-2.4.0-bin-hadoop2.7/R/lib’
(as ‘lib’ is unspecified)
Warning message in install.packages("rJava"):
“installation of package ‘rJava’ had non-zero exit status”
任何人都可以告诉我如何安装该库吗?