Installing R on a Crostini Chromebook

July 22, 2018

Getting R to work is a pain. At the end of the day I installed from source. First, if you’ve been messing with your /etc/apt/sources.list file, restore it by following the examples from here.

I then followed

r_version=3.5.1
wget http://cran.rstudio.com/src/base/R-3/R-"$r_version".tar.gz
mkdir R_HOME
mv R-"$r_version".tar.gz R_HOME/
cd R_HOME/
tar zxvf R-"$r_version".tar.gz
cd R-"$r_version"/
sudo apt-get install default-jdk
sudo apt-get install gfortran libreadline6-dev libx11-dev libxt-dev zlib1g-dev libbz2-dev liblzma-dev libghc-regex-pcre-dev
./configure
make
# Then make sure to add the bin dir to your path