Install rJava in R 3.6 with MacOSX 10.13
Instal homebrew: https://brew.sh/index_fr
In terminal:
brew install --with-toolchain llvm
in .profile, add:
PATH="/usr/local/opt/llvm/bin:${PATH}"
LDFLAGS="-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib"
CPPFLAGS="-I/usr/local/opt/llvm/include"
export LDFLAGS
export CPPFLAGS
Install the latest java jdk: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Look at here: https://biostatsr.blogspot.fr/2018/02/set-javahome-to-correct-value-in-profile.html
In terminal, enter:
cd $(/usr/libexec/java_home)/jre/bin/
sudo ln $(/usr/libexec/java_home)/bin/javac javac
sudo ln $(/usr/libexec/java_home)/bin/javah javah
sudo ln $(/usr/libexec/java_home)/bin/jar jar
cd $(/usr/libexec/java_home)/jre/lib/
sudo ln $(/usr/libexec/java_home)/lib/tools.jar tools.jar
cd $HOME
sudo R CMD javareconf
And in R
install.packages("rJava")
In terminal:
brew install --with-toolchain llvm
in .profile, add:
PATH="/usr/local/opt/llvm/bin:${PATH}"
LDFLAGS="-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib"
CPPFLAGS="-I/usr/local/opt/llvm/include"
export LDFLAGS
export CPPFLAGS
Install the latest java jdk: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Look at here: https://biostatsr.blogspot.fr/2018/02/set-javahome-to-correct-value-in-profile.html
In terminal, enter:
cd $(/usr/libexec/java_home)/jre/bin/
sudo ln $(/usr/libexec/java_home)/bin/javac javac
sudo ln $(/usr/libexec/java_home)/bin/javah javah
sudo ln $(/usr/libexec/java_home)/bin/jar jar
sudo ln $(/usr/libexec/java_home)/lib/tools.jar tools.jar
cd $HOME
sudo R CMD javareconf
And in R
install.packages("rJava")
Commentaires
Enregistrer un commentaire