Hi,
> Le 17 mai 2017 à 13:54, Dirk Eddelbuettel a écrit :
>
>
> On 17 May 2017 at 08:46, Vaidotas Zemlys wrote:
> | Hi,
> |
> | > Le 17 mai 2017 à 00:42, Dirk Eddelbuettel a écrit :
> | >
> | >
> | > On 8 May 2017 at 15:39, Vaidotas Zemlys wrote:
> | > | Hi,
> | > |
> | > | Dirk Eddelbuettel advised me to write here. Here is my original letter
> to him:
> | > |
> | > | I would like to enquire about package r-cran-rjava on Debian jesse. It
> seems that if default-jre package is not installed, but openjdk-7-jre is
> installed, then library(rJava) in R fails. I’ve been bitten by this today and
> I wonder whether this an issue of mine, or is this a possible bug.
> | > |
> | > | My server admin used apt-get update and apt-get upgrade today and R
> started throwing an error that it cannot find libjvm.so, when trying to do
> library(rJava). At first I thought that this is a problem of setting
> JAVA_HOME, and setting it to JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
> before starting R seemed to solve the problem. But this setting was ignored
> by shiny-server, so I spent some time figuring out how to force shiny-server
> to respect it. Only after repeated failure I’ve noticed that LD_LIBRARY_PATH
> in Sys.getenv() points to /usr/lib/jvm/default-java/jre/lib/amd64/server and
> there was no directory /usr/lib/jvm/default-java/ in the system. Then I found
> out that this library is provided by default-jre and when it was installed
> everything start to work. Then I investigated further and found that this
> package is only optional for r-cran-rjava. Hence the question.
> | > |
> | > |
> | > | Here is my configuration:
> | > |
> | > | > lsb_release -a
> | > | No LSB modules are available.
> | > | Distributor ID: Debian
> | > | Description:Debian GNU/Linux 8.8 (jessie)
> | > | Release:8.8
> | > | Codename: jessie
> | > |
> | > |
> | > | dpkg -l with relevant packages:
> | > |
> | > | Desired=Unknown/Install/Remove/Purge/Hold
> | > | |
> Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
> | > | |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
> | > | ||/ Name Version
> Architecture Description
> | > |
> +++-=-=-=-
> | > | ii r-cran-rjava 0.9-6-3 amd64
> GNU R low-level interface to Java
> | > | ii r-base3.3.3-1~jessiecran.0 all
> GNU R statistical computation and graphics system
> | > | ii openjdk-7-jre:amd647u121-2.6.8-2~deb8u1
> amd64OpenJDK Java runtime, using Hotspot JIT
> | > | ii openjdk-7-jre-headless:amd64 7u121-2.6.8-2~deb8u1
> amd64OpenJDK Java runtime, using Hotspot JIT (headless)
> | > |
> | > | Sorry for bothering if this is an issue from my side.
> | >
> | > You have the ‘jre', you need the 'jdk'.
> | >
> |
> | But the r-cran-rjava Depends: do not mention that. Of course having
> packages openjdk-7-jre and openjdk-7-jdk is not at all confusing, but that is
> Java.
>
> I hear you but the 'jdk' is the build-depends, and needed when you want to
> build other packages. The 'jre' is the smaller minimal set needed to only run
> code. At least that was the idea, and at some point it worked. Maybe I need
> to enlarge the Depends to use the jdk.
>
I think there is some misunderstanding. I was not able to run any R package
which depended on rJava, which in binary form was provided by r-cran-rjava. The
issue was that after the update the already installed R packages which were
depending on rJava were not able to load. So build-depend would not have helped
me, because I was not building any packages. Everything started to work after
install of default-jre. Since I did not try to reproduce the bug on a clean
install, there is a chance that my problem was self-inflicted, i.e. my admin
did something not entirely advisable. I think we can close this issue. I’ve
reported the issue, solicited the reaction and reaffirmed “java is tricky”
idiom, so everything is cool from my side.
Vaidotas Zemlys-Balevičius
___
R-SIG-Debian mailing list
R-SIG-Debian@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-debian