Instalação do pacote rJava malsucedida no servidor Vultr (Ubuntu 16.04)

0

Estou tentando instalar o pacote "rJava" R em um servidor Ubuntu 16.

Eu tentei algumas coisas, como reinstalar o JDK, executar um script para definir o caminho inicial e executar o R CMD javareconf (com o comando -e também).

Here is the error I am getting at this point: 

* installing *source* package ‘rJava’ ...
** package ‘rJava’ successfully unpacked and MD5 sums checked
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.: ''
cpp flags   : '-I/usr/lib/jvm/java-10-oracle/include -I/usr/lib/jvm/java-10-oracle/include/linux'
java libs   : '-L/usr/lib/jvm/java-10-oracle/lib/server -ljvm'
configure: error: One or more Java configuration variables are not set.
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’

The downloaded source packages are in
        ‘/tmp/Rtmp6LKO9m/downloaded_packages’
Warning message:
In install.packages("rJava") :
  installation of package ‘rJava’ had non-zero exit status

Algum conselho?

    
por Emerick Larkin 10.05.2018 / 20:59

1 resposta

0

Java 9,10,11 são infames por problemas em encontrar bibliotecas adicionais.

Eu escolhi voltar para o java 8 e NÃO ir com a versão sem cabeçalho. Isso me ajudou:

sudo apt remove openjdk-10-jre-headless
sudo apt remove openjdk-11-jre-headless
sudo apt remove openjdk-8-jre-headless
sudo apt install openjdk-8-jre
    
por Anton 13.05.2018 / 21:56