Wow, this has amplified my respect and gratitude for the R Debian repositories. Doing all the install.packages() and following the clues about missing dependencies has taken hours! However, I have almost all the packages I want installed on this machine and Rstudio and the shiny server are installed and running fine. Bizarrely, to my mind, I am totally failing on rJava and hence a number of packages that depend on it. In R I get: checking Java support in R... present: interpreter : '/usr/lib/jvm/default-java/jre/bin/java' archiver : '' compiler : '' header prep.: '' cpp flags : '' java libs : '' configure: error: Java Development Kit (JDK) is missing or not registered in R Make sure R is configured with full Java support (including JDK). Run R CMD javareconf as root to add Java support to R. When I do R CMD javareconf I get this: root at DebianAdvent:/home/chris/Downloads/gmp-6.1.2# R CMD javareconf Java interpreter : /usr/lib/jvm/default-java/jre/bin/java Java version : 1.8.0_181 Java home path : /usr/lib/jvm/default-java Java compiler : /usr/lib/jvm/default-java/bin/javac Java headers gen.: /usr/lib/jvm/default-java/bin/javah Java archive tool: /usr/lib/jvm/default-java/bin/jar trying to compile and link a JNI program detected JNI cpp flags : detected JNI linker flags : gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fpic -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/stretch/r-base-3.5.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c conftest.c -o conftest.o conftest.c:1:17: fatal error: jni.h: No such file or directory #include <jni.h> ^ compilation terminated. /usr/lib/R/etc/Makeconf:162: recipe for target 'conftest.o' failed make: *** [conftest.o] Error 1 Unable to compile a JNI program JAVA_HOME : /usr/lib/jvm/default-java Java library path: JNI cpp flags : JNI linker flags : Updating Java configuration in /usr/lib/R Done. I'm pretty sure that the problem is with some missing path but I also know I'm out of my depth (again). I'm a bit puzzled because I have only installed default Debian things. Do I need particular non-default Java or Java related components? TIA (again!), Chris -- Chris Evans <chris at psyctc.org> Skype: chris-psyctc Visiting Professor, University of Sheffield <chris.evans at sheffield.ac.uk> I do some consultation work for the University of Roehampton <chris.evans at roehampton.ac.uk> and other places but this <chris at psyctc.org> remains my main Email address. I have "semigrated" to France, see: https://www.psyctc.org/pelerinage2016/semigrating-to-france/ if you want to book to talk, I am trying to keep that to Thursdays and my diary is now available at: https://www.psyctc.org/pelerinage2016/ecwd_calendar/calendar/ Beware: French time, generally an hour ahead of UK. That page will also take you to my blog which started with earlier joys in France and Spain! [[alternative HTML version deleted]]
Johannes Ranke
2019-Jan-22 08:47 UTC
[R-sig-Debian] So nearly there, but can't install rJava
Am Dienstag, 22. Januar 2019, 08:27:14 CET schrieb Chris Evans: ...> error: jni.h: No such file or directory > #include <jni.h> > ^ > compilation terminated.You get a complaint that jni.h is missing. So one strategy would be to look for this file in the available packages: sudo apt-file search jni.h One of the packages returned is openjdk-8-jdk-headless (which I happen to have installed). I think (others will know for certain) that you need a Java Development Kit (jdk) not just a runtime environment (jre). Cheers, Johannes [[alternative HTML version deleted]]
As ever, I learn from this: I didn't know apt-file. Got it, installed it, used it: root at DebianAdvent:/home/chris/Downloads/gmp-6.1.2# apt-file search jni.h android-libnativehelper-dev: /usr/include/android/nativehelper/jni.h android-platform-frameworks-native-headers: /usr/include/android/android/asset_manager_jni.h android-platform-frameworks-native-headers: /usr/include/android/android/native_window_jni.h gcj-6-jdk: /usr/lib/gcc/x86_64-linux-gnu/6/include/jni.h gcj-6-jdk: /usr/lib/jvm/java-1.5.0-gcj-6-amd64/include/jni.h libavcodec-dev: /usr/include/x86_64-linux-gnu/libavcodec/jni.h libgluegen2-build-java: /usr/share/gluegen2/make/stub_includes/jni/jni.h openjdk-8-jdk-headless: /usr/lib/jvm/java-8-openjdk-amd64/include/jni.h I was 99% sure I already had that last installed. Sure enough: root at DebianAdvent:/home/chris/Downloads/gmp-6.1.2# apt-get install openjdk-8-jdk-headless Reading package lists... Done Building dependency tree Reading state information... Done openjdk-8-jdk-headless is already the newest version (8u181-b13-2~deb9u1). openjdk-8-jdk-headless set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Anyone else got any ideas? Chris> From: "Johannes Ranke" <johannes.ranke at jrwb.de> > To: "r-sig-debian" <r-sig-debian at r-project.org>, "Chris Evans" > <chrishold at psyctc.org> > Sent: Tuesday, 22 January, 2019 08:47:28 > Subject: Re: [R-sig-Debian] So nearly there, but can't install rJava> Am Dienstag, 22. Januar 2019, 08:27:14 CET schrieb Chris Evans:> ...> > error: jni.h: No such file or directory> > #include <jni.h>> > ^> > compilation terminated.> You get a complaint that jni.h is missing. So one strategy would be to look for > this file in the available packages:> sudo apt-file search jni.h> One of the packages returned is openjdk-8-jdk-headless (which I happen to have > installed). I think (others will know for certain) that you need a Java > Development Kit (jdk) not just a runtime environment (jre).> Cheers,> Johannes-- Chris Evans <chris at psyctc.org> Skype: chris-psyctc Visiting Professor, University of Sheffield <chris.evans at sheffield.ac.uk> I do some consultation work for the University of Roehampton <chris.evans at roehampton.ac.uk> and other places but this <chris at psyctc.org> remains my main Email address. I have "semigrated" to France, see: https://www.psyctc.org/pelerinage2016/semigrating-to-france/ if you want to book to talk, I am trying to keep that to Thursdays and my diary is now available at: https://www.psyctc.org/pelerinage2016/ecwd_calendar/calendar/ Beware: French time, generally an hour ahead of UK. That page will also take you to my blog which started with earlier joys in France and Spain! [[alternative HTML version deleted]]