1. Configuration of environment variables
The configuration of the R environment in the windows environment and the centOs environment is not the same
错误1:java.lang.UnsatisfiedLinkError: no jri in java.library.path
Solution:
Add LD_LIBRARY_PATH in /etc/profile
My configuration is as follows
#add R env R_HOME=/usr/local/R-3.4.3 PATH=$PATH:$R_HOME/bin LD_LIBRARY_PATH=/usr/local/R-3.4.3/lib JAVA_HOME=/usr/local/jdk1.8.0_161 CLASSPATH=$JAVA_HOME/lib/ PATH=$PATH:$JAVA_HOME/bin:$R_HOME/bin export LD_LIBRARY_PATH R_HOME JAVA_HOME CLASSPATH PATH
The pit encountered is LD_LIBRARY_PATH=/usr/local/R-3.4.3/library/jri under windows
So I have been writing this path in centOs, so I keep getting the error java.lang.UnsatisfiedLinkError: no jri in java.library.path, and it took me 2 days to get it done. I have a good weekend and I have been fighting this error since Friday. It started in the evening and it was resolved by Sunday night.
Error 2: Fatal error: You must choose one of '--save', '--no-save or '--vanilla'
Solution:
Original code:
To color re = new To color(null, false, null);
Change to the following code to solve the above error
Rengine re = new Rengine(new String[] { "--vanilla" }, false, null);