1

My proposal

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
...

Messages after ./configure are all ok without warnings/errors; here tail

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

My make however fails as root apparently because of my Open-JDK Java which I need for 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'

My final solution based on JdeBP's answer - successfully

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

OS: Debian 8.5 64 bit
Linux kernel: 4.6 of backports
Asus Zenbook UX303UA

  • 1
    JdeBP's answer is the correct approach; but to fix your Java problem you'd need to install a JDK (the build found your Oracle JRE). – Stephen Kitt Oct 14 '16 at 18:31
4

Actually, the pages for the Debian r-base package (for example) are here:

Add the "jessie backports" to your sources.list, and you can upgrade to R version 3.3.1, at least, with just APT.

  • "with just apt"... as long as you tell it to use jessie-backports for the relevant packages (-t jessie-backports). – Stephen Kitt Oct 14 '16 at 18:34
  • 1
    @Masi search for "jessie-backports" here, you'll find quite a few examples. – Stephen Kitt Oct 14 '16 at 18:35
  • ... which is mentioned in the two sets ("wiki" and "official") of instructions for installing backports provided by Debian that were already pointed-to in the answer ("wiki" hyperlinking on to "official"). (-: – JdeBP Oct 14 '16 at 18:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.