我试图在数据库中的R笔记本中安装软件包R,但它不起作用。
我已经试过跟踪这个How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning?博客了,但是没有什么效果。
我该怎么办?当我运行它时,它给了我这个:
** package ‘rJava’ successfully unpacked and MD5 sums checked
** using staged installation
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... /usr/bin/grep
checking for egrep... /usr/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/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 3765: /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 ‘/local_disk0/.ephemeral_nfs/envs/rEnv-8a79ddfd-686f-4809-a9fa-08f602c2deea/rJava’
ERROR: dependency ‘rJava’ is not available for package ‘RWekajars’
* removing ‘/local_disk0/.ephemeral_nfs/envs/rEnv-8a79ddfd-686f-4809-a9fa-08f602c2deea/RWekajars’
ERROR: dependencies ‘RWekajars’, ‘rJava’ are not available for package ‘RWeka’
* removing ‘/local_disk0/.ephemeral_nfs/envs/rEnv-8a79ddfd-686f-4809-a9fa-08f602c2deea/RWeka’
ERROR: dependency ‘RWeka’ is not available for package ‘FSelector’
* removing ‘/local_disk0/.ephemeral_nfs/envs/rEnv-8a79ddfd-686f-4809-a9fa-08f602c2deea/FSelector’
Downloading package from url: https://cloud.r-project.org/src/contrib/FSelector_0.33.tar.gz
rJava (NA -> 1.0-6 ) [CRAN]
RWekajars (NA -> 3.9.3-2) [CRAN]
RWeka (NA -> 0.4-44 ) [CRAN]
Installing 3 packages: rJava, RWekajars, RWeka
Installing packages into ‘/local_disk0/.ephemeral_nfs/envs/rEnv-8a79ddfd-686f-4809-a9fa-08f602c2deea’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/rJava_1.0-6.tar.gz'
Content type 'application/x-gzip' length 1047062 bytes (1022 KB)
==================================================
downloaded 1022 KB
trying URL 'https://cloud.r-project.org/src/contrib/RWekajars_3.9.3-2.tar.gz'
Content type 'application/x-gzip' length 10030557 bytes (9.6 MB)
==================================================
downloaded 9.6 MB
trying URL 'https://cloud.r-project.org/src/contrib/RWeka_0.4-44.tar.gz'
Content type 'application/x-gzip' length 456326 bytes (445 KB)
==================================================
downloaded 445 KB
Warning in i.p(...) :
installation of package ‘rJava’ had non-zero exit status
Warning in i.p(...) :
installation of package ‘RWekajars’ had non-zero exit status
Warning in i.p(...) :
installation of package ‘RWeka’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpB7Sohe/downloaded_packages’
Installing package into ‘/local_disk0/.ephemeral_nfs/envs/rEnv-8a79ddfd-686f-4809-a9fa-08f602c2deea’
(as ‘lib’ is unspecified)
Warning in i.p(...) :
installation of package ‘/tmp/RtmpB7Sohe/remotes5c2634c207d/FSelector’ had non-zero exit status```发布于 2022-06-13 18:36:55
此错误:
检查Java运行时是否有效./配置:第3765行:/usr/lib/jvm/default/bin/java:没有这样的文件或目录
建议将R配置为使用机器上不存在的Java副本。您可能需要与Databricks联系,以确认Java / JDK的安装位置,以及是否正确配置了R安装以使用该安装。
您可以通过将JAVA_HOME环境变量设置为指向适当的Java来解决此问题。
https://stackoverflow.com/questions/72606311
复制相似问题