Ubuntu安装xlsx包时遇到ERROR: configuration failed for package ‘rJava’

本文主要是介绍Ubuntu安装xlsx包时遇到ERROR: configuration failed for package ‘rJava’,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

环境描述

环境:Ubuntu子系统

R:4.1.2

在R中安装xlsx包

> install.packages("xlsx", repos = "https://mirrors.ustc.edu.cn/CRAN/")
将程序包安装入‘/usr/local/lib/R/site-library’
(因为‘lib’没有被指定)
还安装相依关系‘rJava’, ‘xlsxjars’试开URL’https://mirrors.ustc.edu.cn/CRAN/src/contrib/rJava_1.0-6.tar.gz'
Content type 'application/octet-stream' length 1047062 bytes (1022 KB)
==================================================
downloaded 1022 KB试开URL’https://mirrors.ustc.edu.cn/CRAN/src/contrib/xlsxjars_0.6.1.tar.gz'
Content type 'application/octet-stream' length 9477071 bytes (9.0 MB)
==================================================
downloaded 9.0 MB试开URL’https://mirrors.ustc.edu.cn/CRAN/src/contrib/xlsx_0.6.5.tar.gz'
Content type 'application/octet-stream' length 489493 bytes (478 KB)
==================================================
downloaded 478 KB* installing *source* package ‘rJava’ ...
** package ‘rJava’ successfully unpacked and MD5 sums checked
** using staged installation
checking for gcc... gcc -std=gnu99 -std=gnu11
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 -std=gnu11 accepts -g... yes
checking for gcc -std=gnu99 -std=gnu11 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -std=gnu99 -std=gnu11 -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 -std=gnu11 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/lib/jvm/default-java/bin/java'
archiver    : '/usr/lib/jvm/default-java/bin/jar'
compiler    : '/usr/lib/jvm/default-java/bin/javac'
header prep.: ''
cpp flags   : '-I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux'
java libs   : '-L/usr/lib/jvm/default-java/lib/server -ljvm'
checking whether Java run-time works... ./configure: line 3796: /usr/lib/jvm/default-java/bin/java: No such file or directory
no
configure: error: Java interpreter '/usr/lib/jvm/default-java/bin/java' does not work
ERROR: configuration failed for package ‘rJava’
* removing ‘/usr/local/lib/R/site-library/rJava’
ERROR: dependency ‘rJava’ is not available for package ‘xlsxjars’
* removing ‘/usr/local/lib/R/site-library/xlsxjars’
ERROR: dependencies ‘rJava’, ‘xlsxjars’ are not available for package ‘xlsx’
* removing ‘/usr/local/lib/R/site-library/xlsx’The downloaded source packages are in‘/tmp/Rtmp4CEfZK/downloaded_packages’
Warning messages:
1: In install.packages("xlsx", repos = "https://mirrors.ustc.edu.cn/CRAN/") :installation of package ‘rJava’ had non-zero exit status
2: In install.packages("xlsx", repos = "https://mirrors.ustc.edu.cn/CRAN/") :installation of package ‘xlsxjars’ had non-zero exit status
3: In install.packages("xlsx", repos = "https://mirrors.ustc.edu.cn/CRAN/") :installation of package ‘xlsx’ had non-zero exit status

再次安装xlsx包

install.packages("xlsx", repos = "https://mirrors.ustc.edu.cn/CRAN/")
将程序包安装入‘/usr/local/lib/R/site-library’
(因为‘lib’没有被指定)
还安装相依关系‘rJava’, ‘xlsxjars’试开URL’https://mirrors.ustc.edu.cn/CRAN/src/contrib/rJava_1.0-6.tar.gz'
Content type 'application/octet-stream' length 1047062 bytes (1022 KB)
==================================================
downloaded 1022 KB试开URL’https://mirrors.ustc.edu.cn/CRAN/src/contrib/xlsxjars_0.6.1.tar.gz'
Content type 'application/octet-stream' length 9477071 bytes (9.0 MB)
==================================================
downloaded 9.0 MB试开URL’https://mirrors.ustc.edu.cn/CRAN/src/contrib/xlsx_0.6.5.tar.gz'
Content type 'application/octet-stream' length 489493 bytes (478 KB)
==================================================
downloaded 478 KB* installing *source* package ‘rJava’ ...
** package ‘rJava’ successfully unpacked and MD5 sums checked
** using staged installation
checking for gcc... gcc -std=gnu99 -std=gnu11
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 -std=gnu11 accepts -g... yes
checking for gcc -std=gnu99 -std=gnu11 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -std=gnu99 -std=gnu11 -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 -std=gnu11 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    : ''
compiler    : ''
header prep.: ''
cpp flags   : ''
java libs   : ''
configure: error: Java Development Kit (JDK) is missing or not registered in R
Make sure R is configured with full Java support (including JDK). Run
R CMD javareconf
as root to add Java support to R.If you don't have root privileges, run
R CMD javareconf -e
to set all Java-related variables and then install rJava.ERROR: configuration failed for package ‘rJava’
* removing ‘/usr/local/lib/R/site-library/rJava’
ERROR: dependency ‘rJava’ is not available for package ‘xlsxjars’
* removing ‘/usr/local/lib/R/site-library/xlsxjars’
ERROR: dependencies ‘rJava’, ‘xlsxjars’ are not available for package ‘xlsx’
* removing ‘/usr/local/lib/R/site-library/xlsx’The downloaded source packages are in‘/tmp/Rtmp4CEfZK/downloaded_packages’
Warning messages:
1: In install.packages("xlsx", repos = "https://mirrors.ustc.edu.cn/CRAN/") :installation of package ‘rJava’ had non-zero exit status
2: In install.packages("xlsx", repos = "https://mirrors.ustc.edu.cn/CRAN/") :installation of package ‘xlsxjars’ had non-zero exit status
3: In install.packages("xlsx", repos = "https://mirrors.ustc.edu.cn/CRAN/") :installation of package ‘xlsx’ had non-zero exit status

错误提示重要信息

ERROR: configuration failed for package ‘rJava’

configure: error: Java Development Kit (JDK) is missing or not registered in R
Make sure R is configured with full Java support (including JDK). Run
R CMD javareconf
as root to add Java support to R.

If you don't have root privileges, run
R CMD javareconf -e
to set all Java-related variables and then install rJava.

 

从错误提示中可以看出是java的问题

因此检查java的问题: java -version

root@DKQNI3:~# java -version
openjdk version "11.0.16" 2022-07-19
OpenJDK Runtime Environment (build 11.0.16+8-post-Ubuntu-0ubuntu118.04)
OpenJDK 64-Bit Server VM (build 11.0.16+8-post-Ubuntu-0ubuntu118.04, mixed mode, sharing)root@DKQNI3:~# R CMD javareconf
*** JAVA_HOME is not a valid path, ignoring
Java interpreter : /usr/bin/java
Java version     : 11.0.16
Java home path   : /usr/lib/jvm/java-11-openjdk-amd64
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$(JAVA_HOME)/lib/server -ljvm
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-J7pprH/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c conftest.c -o conftest.o
conftest.c:1:10: fatal error: jni.h: No such file or directory#include <jni.h>^~~~~~~
compilation terminated.
/usr/lib/R/etc/Makeconf:168: recipe for target 'conftest.o' failed
make: *** [conftest.o] Error 1
Unable to compile a JNI programJAVA_HOME        : /usr/lib/jvm/java-11-openjdk-amd64
Java library path: 
JNI cpp flags    : 
JNI linker flags : 
Updating Java configuration in /usr/lib/R
Done.

安装相关依赖包

root@DKQNI3:~# apt-get install default-jdk
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
将会同时安装下列软件:default-jdk-headless default-jre default-jre-headless fonts-dejavu-extra libatk-wrapper-javalibatk-wrapper-java-jni libgif7 libice-dev libsm-dev libxt-dev openjdk-11-jdkopenjdk-11-jdk-headless openjdk-11-jre
建议安装:libice-doc libsm-doc libxt-doc openjdk-11-demo openjdk-11-source visualvm
下列【新】软件包将被安装:default-jdk default-jdk-headless default-jre default-jre-headless fonts-dejavu-extralibatk-wrapper-java libatk-wrapper-java-jni libgif7 libice-dev libsm-dev libxt-devopenjdk-11-jdk openjdk-11-jdk-headless openjdk-11-jre
升级了 0 个软件包,新安装了 14 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 225 MB/225 MB 的归档。
解压缩后会消耗 242 MB 的额外空间。
您希望继续执行吗? [Y/n] Y

再次执行root@xx:~# R CMD javareconf

root@DKQNI3:~# R CMD javareconf
Java interpreter : /usr/lib/jvm/default-java/bin/java
Java version     : 11.0.16
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/jartrying 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 -std=gnu11 -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-J7pprH/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c conftest.c -o conftest.o
gcc -std=gnu99 -std=gnu11 -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 -lRJAVA_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.
root@DKQNI3:~# R CMD javareconf -e
Java interpreter : /usr/lib/jvm/default-java/bin/java
Java version     : 11.0.16
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/jartrying 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 -std=gnu11 -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-J7pprH/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c conftest.c -o conftest.o
gcc -std=gnu99 -std=gnu11 -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 -lRThe following Java variables have been exported:
JAVA_HOME JAVA JAVAC JAVAH JAR JAVA_LIBS JAVA_CPPFLAGS JAVA_LD_LIBRARY_PATH
Running: /bin/bash

重新安装rJava

> install.packages("rJava", repos = "https://mirrors.ustc.edu.cn/CRAN/")
将程序包安装入‘/usr/local/lib/R/site-library’
(因为‘lib’没有被指定)
试开URL’https://mirrors.ustc.edu.cn/CRAN/src/contrib/rJava_1.0-6.tar.gz'
Content type 'application/octet-stream' length 1047062 bytes (1022 KB)
==================================================
downloaded 1022 KB* installing *source* package ‘rJava’ ...
** package ‘rJava’ successfully unpacked and MD5 sums checked
** using staged installation
checking for gcc... gcc -std=gnu99 -std=gnu11
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 -std=gnu11 accepts -g... yes
checking for gcc -std=gnu99 -std=gnu11 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -std=gnu99 -std=gnu11 -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 -std=gnu11 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/lib/jvm/default-java/bin/java'
archiver    : '/usr/lib/jvm/default-java/bin/jar'
compiler    : '/usr/lib/jvm/default-java/bin/javac'
header prep.: ''
cpp flags   : '-I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux'
java libs   : '-L/usr/lib/jvm/default-java/lib/server -ljvm'
checking whether Java run-time works... yes
checking whether -Xrs is supported... yes
checking whether -Xrs will be used... yes
checking whether JVM will be loaded dynamically... no
checking whether JNI programs can be compiled... yes
checking whether JNI programs run... yes
checking JNI data types... ok
checking whether JRI should be compiled (autodetect)... yes
checking whether debugging output should be enabled... no
checking whether memory profiling is desired... no
checking whether threads support is requested... no
checking whether callbacks support is requested... no
checking whether JNI cache support is requested... no
checking whether headless init is enabled... no
checking whether JRI is requested... yes
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating R/zzz.R
config.status: creating src/config.h
=== configuring in jri (/tmp/Rtmpx8fPnF/R.INSTALL9d76b771f72/rJava/jri)
configure: running /bin/bash ./configure --disable-option-checking '--prefix=/usr/local'  --cache-file=/dev/null --srcdir=.
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc -std=gnu99 -std=gnu11
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 the compiler supports GNU C... yes
checking whether gcc -std=gnu99 -std=gnu11 accepts -g... yes
checking for gcc -std=gnu99 -std=gnu11 option to enable C11 features... none needed
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for sys/time.h... yes
checking for sys/types.h... (cached) yes
checking for sys/select.h... yes
checking Java version... 11.0.16
checking Java compatibility version (integer)... 11
checking whether  actually works... no
checking whether javah was replaced by javac -h... yes
checking for target flags...  -h . -target 1.6 -source 1.6
checking whether Java interpreter works... checking whether JNI programs can be compiled... yes
checking whether JNI programs can be run... yes
checking JNI data types... ok
checking whether Rinterface.h exports R_CStackXXX variables... yes
checking whether Rinterface.h exports R_SignalHandlers... yes
configure: creating ./config.status
config.status: creating src/Makefile
config.status: creating Makefile
config.status: creating run
config.status: creating src/config.h
** libs
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG -I. -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux     -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-J7pprH/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c Rglue.c -o Rglue.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG -I. -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux     -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-J7pprH/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c arrayc.c -o arrayc.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG -I. -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux     -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-J7pprH/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c callJNI.c -o callJNI.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG -I. -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux     -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-J7pprH/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c callback.c -o callback.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG -I. -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux     -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-J7pprH/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c fields.c -o fields.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG -I. -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux     -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-J7pprH/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c init.c -o init.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG -I. -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux     -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-J7pprH/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c jri_glue.c -o jri_glue.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG -I. -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux     -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-J7pprH/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c loader.c -o loader.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG -I. -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux     -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-J7pprH/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c otables.c -o otables.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG -I. -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux     -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-J7pprH/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c rJava.c -o rJava.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG -I. -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux     -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-J7pprH/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c registration.c -o registration.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG -I. -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux     -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-J7pprH/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c tools.c -o tools.o
gcc -std=gnu99 -std=gnu11 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o rJava.so Rglue.o arrayc.o callJNI.o callback.o fields.o init.o jri_glue.o loader.o otables.o rJava.o registration.o tools.o -L/usr/lib/jvm/default-java/lib/server -ljvm -L/usr/lib/R/lib -lR
(cd ../jri && make)
make[1]: Entering directory '/tmp/Rtmpx8fPnF/R.INSTALL9d76b771f72/rJava/jri'
make -C src JRI.jar
make[2]: Entering directory '/tmp/Rtmpx8fPnF/R.INSTALL9d76b771f72/rJava/jri/src'
/usr/lib/jvm/default-java/bin/javac -h . -target 1.6 -source 1.6  -d . ../package-info.java ../RFactor.java ../REXP.java ../Rengine.java ../Mutex.java ../RConsoleOutputStream.java ../RMainLoopCallbacks.java ../RVector.java ../RBool.java ../RList.java
warning: [options] bootstrap class path not set in conjunction with -source 6
warning: [options] source value 6 is obsolete and will be removed in a future release
warning: [options] target value 1.6 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 warnings
if [ -n "" ]; then  -d . -classpath . org.rosuda.JRI.Rengine; fi
gcc -std=gnu99 -std=gnu11 -c -o Rengine.o Rengine.c -g -Iinclude  -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -DHAVE_CONFIG_H -g -O2 -fdebug-prefix-map=/build/r-base-J7pprH/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux  -fpic -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux -I/usr/share/R/include -I/usr/share/R/include 
gcc -std=gnu99 -std=gnu11 -c -o jri.o jri.c -g -Iinclude  -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -DHAVE_CONFIG_H -g -O2 -fdebug-prefix-map=/build/r-base-J7pprH/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux  -fpic -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux -I/usr/share/R/include -I/usr/share/R/include 
gcc -std=gnu99 -std=gnu11 -c -o Rcallbacks.o Rcallbacks.c -g -Iinclude  -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -DHAVE_CONFIG_H -g -O2 -fdebug-prefix-map=/build/r-base-J7pprH/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux  -fpic -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux -I/usr/share/R/include -I/usr/share/R/include 
gcc -std=gnu99 -std=gnu11 -c -o Rinit.o Rinit.c -g -Iinclude  -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -DHAVE_CONFIG_H -g -O2 -fdebug-prefix-map=/build/r-base-J7pprH/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux  -fpic -I/usr/share/R/include -I/usr/share/R/include 
gcc -std=gnu99 -std=gnu11 -c -o globals.o globals.c -g -Iinclude  -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -DHAVE_CONFIG_H -g -O2 -fdebug-prefix-map=/build/r-base-J7pprH/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux  -fpic -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux 
gcc -std=gnu99 -std=gnu11 -c -o rjava.o rjava.c -g -Iinclude  -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -DHAVE_CONFIG_H -g -O2 -fdebug-prefix-map=/build/r-base-J7pprH/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux  -fpic -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux 
gcc -std=gnu99 -std=gnu11 -o libjri.so Rengine.o jri.o Rcallbacks.o Rinit.o globals.o rjava.o  -shared -L/usr/lib/jvm/default-java/lib/server -ljvm -Wl,--export-dynamic -fopenmp -Wl,-Bsymbolic-functions -Wl,-z,relro -L/usr/lib/R/lib -lR -lpcre2-8 -llzma -lbz2 -lz -lrt -ldl -lm -licuuc -licui18n 
/usr/lib/jvm/default-java/bin/javac -h . -target 1.6 -source 1.6  -d . ../package-info.java ../RFactor.java ../REXP.java ../RList.java ../Mutex.java ../RVector.java ../RBool.java ../RConsoleOutputStream.java ../RMainLoopCallbacks.java ../Rengine.java
warning: [options] bootstrap class path not set in conjunction with -source 6
warning: [options] source value 6 is obsolete and will be removed in a future release
warning: [options] target value 1.6 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 warnings
/usr/lib/jvm/default-java/bin/jar fc JRI.jar org libjri.so
make[2]: Leaving directory '/tmp/Rtmpx8fPnF/R.INSTALL9d76b771f72/rJava/jri/src'
rm -f libjri.so
cp src/libjri.so libjri.so
/usr/lib/jvm/default-java/bin/javac -h . -target 1.6 -source 1.6 -classpath src/JRI.jar -d examples examples/rtest.java
warning: [options] bootstrap class path not set in conjunction with -source 6
warning: [options] source value 6 is obsolete and will be removed in a future release
warning: [options] target value 1.6 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
Note: examples/rtest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
4 warnings
/usr/lib/jvm/default-java/bin/javac -h . -target 1.6 -source 1.6 -classpath src/JRI.jar -d examples examples/rtest2.java
warning: [options] bootstrap class path not set in conjunction with -source 6
warning: [options] source value 6 is obsolete and will be removed in a future release
warning: [options] target value 1.6 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
Note: examples/rtest2.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
4 warnings
make[1]: Leaving directory '/tmp/Rtmpx8fPnF/R.INSTALL9d76b771f72/rJava/jri'
installing via 'install.libs.R' to /usr/local/lib/R/site-library/00LOCK-rJava/00new/rJava
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (rJava)The downloaded source packages are in‘/tmp/Rtmp4CEfZK/downloaded_packages’

rJava安装后重新安装xlsx

> install.packages("xlsx", repos = "https://mirrors.ustc.edu.cn/CRAN/")
将程序包安装入‘/usr/local/lib/R/site-library’
(因为‘lib’没有被指定)
还安装相依关系‘xlsxjars’试开URL’https://mirrors.ustc.edu.cn/CRAN/src/contrib/xlsxjars_0.6.1.tar.gz'
Content type 'application/octet-stream' length 9477071 bytes (9.0 MB)
==================================================
downloaded 9.0 MB试开URL’https://mirrors.ustc.edu.cn/CRAN/src/contrib/xlsx_0.6.5.tar.gz'
Content type 'application/octet-stream' length 489493 bytes (478 KB)
==================================================
downloaded 478 KB* installing *source* package ‘xlsxjars’ ...
** package ‘xlsxjars’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (xlsxjars)
* installing *source* package ‘xlsx’ ...
** package ‘xlsx’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (xlsx)The downloaded source packages are in‘/tmp/Rtmp4CEfZK/downloaded_packages’

 

这篇关于Ubuntu安装xlsx包时遇到ERROR: configuration failed for package ‘rJava’的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/550035

相关文章

JVM 的类初始化机制

前言 当你在 Java 程序中new对象时,有没有考虑过 JVM 是如何把静态的字节码(byte code)转化为运行时对象的呢,这个问题看似简单,但清楚的同学相信也不会太多,这篇文章首先介绍 JVM 类初始化的机制,然后给出几个易出错的实例来分析,帮助大家更好理解这个知识点。 JVM 将字节码转化为运行时对象分为三个阶段,分别是:loading 、Linking、initialization

Spring Security 基于表达式的权限控制

前言 spring security 3.0已经可以使用spring el表达式来控制授权,允许在表达式中使用复杂的布尔逻辑来控制访问的权限。 常见的表达式 Spring Security可用表达式对象的基类是SecurityExpressionRoot。 表达式描述hasRole([role])用户拥有制定的角色时返回true (Spring security默认会带有ROLE_前缀),去

浅析Spring Security认证过程

类图 为了方便理解Spring Security认证流程,特意画了如下的类图,包含相关的核心认证类 概述 核心验证器 AuthenticationManager 该对象提供了认证方法的入口,接收一个Authentiaton对象作为参数; public interface AuthenticationManager {Authentication authenticate(Authenti

Spring Security--Architecture Overview

1 核心组件 这一节主要介绍一些在Spring Security中常见且核心的Java类,它们之间的依赖,构建起了整个框架。想要理解整个架构,最起码得对这些类眼熟。 1.1 SecurityContextHolder SecurityContextHolder用于存储安全上下文(security context)的信息。当前操作的用户是谁,该用户是否已经被认证,他拥有哪些角色权限…这些都被保

Spring Security基于数据库验证流程详解

Spring Security 校验流程图 相关解释说明(认真看哦) AbstractAuthenticationProcessingFilter 抽象类 /*** 调用 #requiresAuthentication(HttpServletRequest, HttpServletResponse) 决定是否需要进行验证操作。* 如果需要验证,则会调用 #attemptAuthentica

Spring Security 从入门到进阶系列教程

Spring Security 入门系列 《保护 Web 应用的安全》 《Spring-Security-入门(一):登录与退出》 《Spring-Security-入门(二):基于数据库验证》 《Spring-Security-入门(三):密码加密》 《Spring-Security-入门(四):自定义-Filter》 《Spring-Security-入门(五):在 Sprin

Java架构师知识体认识

源码分析 常用设计模式 Proxy代理模式Factory工厂模式Singleton单例模式Delegate委派模式Strategy策略模式Prototype原型模式Template模板模式 Spring5 beans 接口实例化代理Bean操作 Context Ioc容器设计原理及高级特性Aop设计原理Factorybean与Beanfactory Transaction 声明式事物

Zookeeper安装和配置说明

一、Zookeeper的搭建方式 Zookeeper安装方式有三种,单机模式和集群模式以及伪集群模式。 ■ 单机模式:Zookeeper只运行在一台服务器上,适合测试环境; ■ 伪集群模式:就是在一台物理机上运行多个Zookeeper 实例; ■ 集群模式:Zookeeper运行于一个集群上,适合生产环境,这个计算机集群被称为一个“集合体”(ensemble) Zookeeper通过复制来实现

CentOS7安装配置mysql5.7 tar免安装版

一、CentOS7.4系统自带mariadb # 查看系统自带的Mariadb[root@localhost~]# rpm -qa|grep mariadbmariadb-libs-5.5.44-2.el7.centos.x86_64# 卸载系统自带的Mariadb[root@localhost ~]# rpm -e --nodeps mariadb-libs-5.5.44-2.el7

Centos7安装Mongodb4

1、下载源码包 curl -O https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel70-4.2.1.tgz 2、解压 放到 /usr/local/ 目录下 tar -zxvf mongodb-linux-x86_64-rhel70-4.2.1.tgzmv mongodb-linux-x86_64-rhel70-4.2.1/