简体   繁体   中英

Install FSelector in R Notebook Databricks

I'm trying to install the package FSelector in my R notebook in databricks and it's not working.

I've already tried following this How should I deal with "package 'xxx' is not available (for R version xyz)" warning? blogpost but nothing worked.

What should I do? When I run it it gives me this:

** 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```

This error:

checking whether Java run-time works... ./configure: line 3765: /usr/lib/jvm/default-java/bin/java: No such file or directory

suggests that R has been configured to use a copy of Java that does not exist on the machine. You likely need to contact Databricks to confirm where the Java JRE / JDK is installed, and whether the R installation has been configured properly to use that installation.

It's possible you could work around this issue by setting the JAVA_HOME environment variable to point to an appropriate Java installation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM