Closed avishai987 closed 8 months ago
Hello @avishai987 Please follow the advice in this article and let me know if that resolves the issue. Particularly, this section to reconfigure R so that R points to the desired Java installation.
sudo R CMD javareconf
Hello @avishai987 Please follow the advice in this article and let me know if that resolves the issue. Particularly, this section to reconfigure R so that R points to the desired Java installation.
sudo R CMD javareconf
Thanks, forgot to mention that I tried that, but I don't have sudo permission (university server), so:
moriah-gw-02:~% R CMD javareconf
Java interpreter : /usr/lib/jvm/default-java/bin/java
Java version : 11.0.12
Java home path : /usr/lib/jvm/default-java
Java compiler : /usr/lib/jvm/default-java/bin/javac
Java headers gen.:
Java archive tool: /usr/lib/jvm/default-java/bin/jar
trying to compile and link a JNI program
detected JNI cpp flags : -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
detected JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux -fpic -g -O2 -fdebug-prefix-map=/build/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
gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-z,relro -o conftest.so conftest.o -L/usr/lib/jvm/default-java/lib/server -ljvm -L/usr/lib/R/lib -lR
JAVA_HOME : /usr/lib/jvm/default-java
Java library path: $(JAVA_HOME)/lib/server
JNI cpp flags : -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
Updating Java configuration in /usr/lib/R
/usr/lib/R/bin/javareconf: line 399: /usr/lib/R/etc/Makeconf.new: Read-only file system
*** cannot create /usr/lib/R/etc/Makeconf.new
*** Please run as root if required.
I would contact your sysadmin. Without the proper configuration, you will not be able to pathfindR or other R packages that depend on Java. If you feel comfortable, other options are:- to use the conda package (likely to run into the same issue - to use the docker image of pathfindR (I’m not sure but it should up-to-date)-EOn 17 Jan 2024, at 11:56, Avishai Wizel @.***> wrote:
Hello @avishai987 Please follow the advice in this article and let me know if that resolves the issue. Particularly, this section to reconfigure R so that R points to the desired Java installation. sudo R CMD javareconf
Thanks, forgot to mention that I tried that, but I don't have sudo permission, so: moriah-gw-02:~% R CMD javareconf Java interpreter : /usr/lib/jvm/default-java/bin/java Java version : 11.0.12 Java home path : /usr/lib/jvm/default-java Java compiler : /usr/lib/jvm/default-java/bin/javac Java headers gen.: Java archive tool: /usr/lib/jvm/default-java/bin/jar
trying to compile and link a JNI program detected JNI cpp flags : -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux detected JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux -fpic -g -O2 -fdebug-prefix-map=/build/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 gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-z,relro -o conftest.so conftest.o -L/usr/lib/jvm/default-java/lib/server -ljvm -L/usr/lib/R/lib -lR
JAVA_HOME : /usr/lib/jvm/default-java Java library path: $(JAVA_HOME)/lib/server JNI cpp flags : -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm Updating Java configuration in /usr/lib/R /usr/lib/R/bin/javareconf: line 399: /usr/lib/R/etc/Makeconf.new: Read-only file system cannot create /usr/lib/R/etc/Makeconf.new Please run as root if required.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>
Hi, and thanks for the nice-looking package. I have an error while installing. I tried "install.packages("pathfindR")", pak::pkg_install("pathfindR") and devtools::install_github("egeulgen/pathfindR") and I get different error message:
Describe the bug for install.packages("pathfindR") I am getting error: Java version not detected. I saw that it has been asked before, but the problem in my case is that JAVA is installed and JAVA_HOME is set (I debug the function fetch_java_version) but the folder not visible to rsutdio, thus getting TRUE when:
!file.exists("/usr/lib/jvm/java-11-openjdk-amd64/")
but the folder is definitely exists.pak::pkg_install("pathfindR") raised unexplained error:
And devtools::install_github("egeulgen/pathfindR") raise: Error: package ‘pathfindR.data’ 1.1.2 was found, but >= 2.0 is required by ‘pathfindR’
R Session Information:
Thanks in advance