"R extension Error - Process failed, could not initialize R via JRI"
User13
New Altair Community Member
Hi,
Been trying a few days to fix this error. Process failed, could not initialize R via JRI.
I am using macbook, and followed this strictly:
======
After you have installed a proper version of R, you need to install rJava and JavaGD available on CRAN by typing the following command on the R console:
install.packages(c("rJava","JavaGD"))
Then you should activate rJava and JavaGD in the R package management.
>>I installed both packages, and started them using library(rJava) and library(JavaGD)
>> R is definitely working on my machine
Add following lines to your ~/.bash_profile or ~/.profile:
export R_HOME=/Library/Frameworks/R.framework/Resources
export JAVA_HOME=$(/usr/libexec/java_home)
>> I did this as well, and mine entries are
>> export R_HOME=/Library/Frameworks/R.framework/Resources
>> export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home
Now you can configure RapidMiner. Click on Select JRI library file and select the JRI dynamic-link library (e.g. /Library/Frameworks/R.framework/Resources/library/rJava/jri/libjri.jnilib).
>> Selected /Library/Frameworks/R.framework/Versions/3.0/Resources/library/rJava/jri/libjri.jnilib
After selecting the file you have to restart RapidMiner and the console you have started RapidMiner with.
>> I did the restart, but the error persists.
Thanks in advanced.
Been trying a few days to fix this error. Process failed, could not initialize R via JRI.
I am using macbook, and followed this strictly:
======
After you have installed a proper version of R, you need to install rJava and JavaGD available on CRAN by typing the following command on the R console:
install.packages(c("rJava","JavaGD"))
Then you should activate rJava and JavaGD in the R package management.
>>I installed both packages, and started them using library(rJava) and library(JavaGD)
>> R is definitely working on my machine
Add following lines to your ~/.bash_profile or ~/.profile:
export R_HOME=/Library/Frameworks/R.framework/Resources
export JAVA_HOME=$(/usr/libexec/java_home)
>> I did this as well, and mine entries are
>> export R_HOME=/Library/Frameworks/R.framework/Resources
>> export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home
Now you can configure RapidMiner. Click on Select JRI library file and select the JRI dynamic-link library (e.g. /Library/Frameworks/R.framework/Resources/library/rJava/jri/libjri.jnilib).
>> Selected /Library/Frameworks/R.framework/Versions/3.0/Resources/library/rJava/jri/libjri.jnilib
After selecting the file you have to restart RapidMiner and the console you have started RapidMiner with.
>> I did the restart, but the error persists.
Thanks in advanced.
Tagged:
0
Answers
-
Hi Brian,
Would you double check that the bit architectures are the same for Java, RapidMiner, and R? They all need to be the same and double check that you are using Java version 7.
Regards,
Thomas0 -
Thanks Thomas,
1) I checked that both java and R are 64bits, I presumed Rapidminer is as well since I downloaded the mac version from rapidminer.com
2) I also changed to 1.7 java, and then restarted machine, same error persists,
Any idea how to solve this ?
my env:
TERM_PROGRAM=Apple_Terminal
TERM=xterm-256color
SHELL=/bin/bash
TMPDIR=/var/folders/pj/rbkfxc9n5c19w3jm5g7_4b740000gn/T/
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.p1LsP9mJUN/Render
TERM_PROGRAM_VERSION=343
OLDPWD=/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home
TERM_SESSION_ID=D70F8BF5-68A1-465A-8A31-47A6AD309347
USER=brianho
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.BhzMoGUTxw/Listeners
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
PATH=/Library/Frameworks/R.framework/Versions/3.0/Resources/library/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
PWD=/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
HOME=/Users/brianho
SHLVL=1
LOGNAME=brianho
LC_CTYPE=UTF-8
R_HOME=/Library/Frameworks/R.framework/Resources
_=/usr/bin/env0 -
Hi Brian,
I assume your environment variables above are not set for RapidMiner Studio when the standard launcher is used. In order to make them accessible for the application a bash terminal needs to be started and RapidMiner Studio must be launched via the RapidMiner-Studio.sh from that shell. To avoid this procedure and use the standard launcher icon it might be necessary to set the R_HOME variable using */etc/launchd.conf*. Here "setenv R_HOME " needs to be added and the system must be rebooted for the changes to take effect.
Cheers,
Helge0