Skip to content
Prev 3015 / 3656 Next

So nearly there, but can't install rJava

Thanks Sebastian, Johannes and Dirk for your inputs, I think this can be marked [SOLVED] though I still don't understand how it started. 

The answer seems to be that something sets an environment variable JAVA.LIBRARY.PATH and this wasn't set correctly. I had never directly done anything to set that so that's odd but what I had done that was causing the problem (I think) is that I had used /etc/environment to set JAVA.HOME (I think that's the spelling). I had set that correctly to point to the openjdk directory but clearly that was causing something else to misset JAVA.LIBRARY.PATH hence the "R CMD config JAVA" instruction not finding the header. When I realised it was that environment variable that was at fault I rebooted the machine to get a clean start (having deleted my /etc/environment) and then "R CMD config JAVA" worked and then install.packages("rJava") worked and I'm happy. 

I still don't know what had caused the problem in the first place: I hadn't directly edited anything or changed anything until I hit the first failure of "R CMD config JAVA". After that I used synaptic to add to java related things installed on the machine and I assume somewhere in that process I managed to do something that messed up the environment variable. That seems surprising or frankly unlikely but I know I didn't do anything else that might have done this. I was going through that whole slew of installing other things using apt-get and there was one dependency that I downloaded and compiled with the full ./configure, make, make clean, make install sequence (began with g? can't remember name, the HH package depended on it, I remember that much, perhaps there was an easier way to get that). I can't see that any of that should have hit this environment variable but clearly something I did caused it and it's sorted now. 

I can play around with the shiny server now on this local machine and be sure I feel safe with it before I install it on my main server. 

Final question to anyone who has read this far: any advice about using the open source shiny server on a Debian stretch server? It's a fairly well equipped VM provided by my ISP and also runs WordPress for several WP sites but nothing much else beyond a one plain old apache site. 

Very best all and thanks again, 

Chris 

----- Original Message -----