Como instalar o último R quando este problema de Java no Debian?

1

Minha proposta

su 
apt-get purge r-base r-base-dev 
exit

wget https://cran.r-project.org/src/base/R-3/R-3.3.1.tar.gz
tar -zxvf R-3.3.1.tar.gz
su     
apt-get install libcurl4-openssl-dev # otherwise, error: configure: error: libcurl >= 7.28.0 library and headers are required with support for https in ./configure
./configure
make
...

Mensagens após ./configure estão todas ok sem avisos / erros; aqui cauda

R is now configured for x86_64-pc-linux-gnu

  Source directory:          .
  Installation directory:    /usr/local

  C compiler:                gcc -std=gnu99  -g -O2
  Fortran 77 compiler:       gfortran  -g -O2

  C++ compiler:              g++  -g -O2
  C++11 compiler:            g++  -std=c++11 -g -O2
  Fortran 90/95 compiler:    gfortran -g -O2
  Obj-C compiler:         

  Interfaces supported:      X11
  External libraries:        readline, curl
  Additional capabilities:   PNG, JPEG, NLS
  Options enabled:           shared BLAS, R profiling

  Capabilities skipped:      TIFF, cairo, ICU
  Options not enabled:       memory profiling

  Recommended packages:      yes

Meu make no entanto falha como root aparentemente por causa do meu Open-JDK Java que eu preciso para o SPSS Statistics

** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (mgcv)
make[2]: Leaving directory '/home/masi/Downloads/R3.3/R-3.3.1/src/library/Recommended'
make[1]: Leaving directory '/home/masi/Downloads/R3.3/R-3.3.1/src/library/Recommended'
make[1]: Entering directory '/home/masi/Downloads/R3.3/R-3.3.1/src/library'
building/updating vignettes for package 'grid' ...
building/updating vignettes for package 'parallel' ...
building/updating vignettes for package 'utils' ...
make[1]: Leaving directory '/home/masi/Downloads/R3.3/R-3.3.1/src/library'
make[1]: Entering directory '/home/masi/Downloads/R3.3/R-3.3.1'
configuring Java ...
Java interpreter : /usr/bin/java
Java version     : 1.8.0_102
Java home path   : /usr/lib/jvm/jre-8-oracle-x64
Java compiler    : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar

trying to compile and link a JNI program 
detected JNI cpp flags    : 
detected JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -ljvm
make[2]: Entering directory '/tmp/Rjavareconf.gPqbgX'
gcc -std=gnu99 -I/home/masi/Downloads/R3.3/R-3.3.1/include -DNDEBUG  -I/usr/local/include    -fpic  -g -O2  -c conftest.c -o conftest.o
conftest.c:1:17: fatal error: jni.h: No such file or directory
 #include <jni.h>
                 ^
compilation terminated.
/home/masi/Downloads/R3.3/R-3.3.1/etc/Makeconf:132: recipe for target 'conftest.o' failed
make[2]: *** [conftest.o] Error 1
make[2]: Leaving directory '/tmp/Rjavareconf.gPqbgX'
Unable to compile a JNI program

JAVA_HOME        : /usr/lib/jvm/jre-8-oracle-x64
Java library path: 
JNI cpp flags    : 
JNI linker flags : 
Updating Java configuration in /home/masi/Downloads/R3.3/R-3.3.1
Done.

make[1]: Leaving directory '/home/masi/Downloads/R3.3/R-3.3.1'

Minha solução final baseada na resposta do JdeBP - com sucesso

su
apt-get install -t jessie-backports r-base r-base-dev

OS: Debian 8.5 64 bit
Kernel Linux: 4.6 de backports
Asus Zenbook UX303UA

    
por Léo Léopold Hertz 준영 14.10.2016 / 19:41

1 resposta

4

Na verdade, as páginas para o pacote Debian r-base (por exemplo) estão aqui:

Adicione os "jessie backports " ao seu sources.list , e você pode atualizar para o R versão 3.3.1, pelo menos , com apenas APT.

    
por 14.10.2016 / 20:25

Tags