Skip to content

Instantly share code, notes, and snippets.

@jtilly jtilly/install_r.sh

Last active Jun 16, 2016
Embed
What would you like to do?
Install R and libcurl from source
# This script installs libcurl and R 3.3.0 on a linux server
# when you can't use apt-get. Note that libcurl is a requirement
# for R 3.3.0
# also see: http://pj.freefaculty.org/blog/?p=315
export PATH=$HOME/packages/bin:$PATH
export LD_LIBRARY_PATH=$HOME/packages/lib:$LD_LIBRARY_PATH
export CFLAGS="-I$HOME/packages/include"
export LDFLAGS="-L$HOME/packages/lib"
export F77="gfortran"
export FC="gfortran"
export CC="gcc"
export CXX="g++"
mkdir -p $HOME/packages
mkdir -p $HOME/src
cd $HOME/src
wget http://security.ubuntu.com/ubuntu/pool/main/c/curl/curl_7.47.0.orig.tar.gz
wget https://cran.r-project.org/src/base/R-3/R-3.3.0.tar.gz
tar xvf curl_7.47.0.orig.tar.gz
tar xvf R-3.3.0.tar.gz
cd $HOME/src/curl-7.47.0
./configure --prefix=$HOME/packages
make
make install
cd $HOME/src/R-3.3.0
./configure --prefix=$HOME/packages
make
make install
# Your probably want to add the line
# export PATH=$HOME/packages/bin:$PATH
# to your .bash_profile so that R is on your path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.