Skip to content

Instantly share code, notes, and snippets.

@Niknafs
Last active April 6, 2017 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Niknafs/4433724ebef1302b6646ebf8985a4031 to your computer and use it in GitHub Desktop.
Save Niknafs/4433724ebef1302b6646ebf8985a4031 to your computer and use it in GitHub Desktop.
Installing rJava in ubuntu (docker)

Start a docker with correct working directory mounted

docker run -d --name expands -i -t -v xxx:xxx ubuntu:14.04 bash

Install the requirements in the container

docker attach expands
# apt-get update
# apt-get install emacs
# apt-get install r-base
# apt-get install openjdk-7-jdk

Installing rJava:

R CMD javareconf

From inside R:

> install.packages('rJava') --> select mirror 139. Surprisingly, not all mirrors worked.

install ape dependency:

apt-get install wget
wget https://cran.r-project.org/src/contrib/Archive/ape/ape_3.2.tar.gz
install.packages('ape_3.2.tar.gz', repos = NULL, type = "source")

finally install expands

install.packages('expands') # --> selected mirror 129
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment