1. 程式人生 > >rJava在ubuntu上的安裝

rJava在ubuntu上的安裝

配置 ubun java 型號 oracl chm ack rom deb

1、Oracle JDK 8(必須裝oracle的,open的不行)

Install Oracle JDK 8 on Linux x64 (eg: Debian)
http://askubuntu.com/questions/56104/how-can-i-install-sun-oracles-proprietary-java-jdk-6-7-8-or-jre

1) download JDK 8 from Oracle, jdk-8uversion-linux-x64.tar.gz
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
2) http://docs.oracle.com/javase/8/docs/technotes/guides/install/linux_jdk.html#BJFJJEFG $ sudo mkdir -p /usr/lib/jvm $ sudo tar zxf jdk-8u121-linux-x64.tar.gz -C /usr/lib/jvm/ $ sudo chown -R root:root /usr/lib/jvm/jdk1.8.0_121 $ sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0_121/bin/java" 1 $ sudo update
-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0_121/bin/javac" 1 $ sudo chmod a+x /usr/bin/java $ sudo chmod a+x /usr/bin/javac $ sudo update-alternatives --config java $ sudo update-alternatives --config javac $ java -version

註意跟你的版本型號保持一致,例如jdk1.8.0_121

2、rJava安裝

sudo R CMD javareconf   #以root權限配置rJava環境
sudo R
install.packages(
"rJava") library(rJava)

rJava在ubuntu上的安裝