Skip to content

Instantly share code, notes, and snippets.

@jtilly
Last active June 16, 2016 17:57
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 jtilly/d421b5d363cc2db860cc431a1128abc4 to your computer and use it in GitHub Desktop.
Save jtilly/d421b5d363cc2db860cc431a1128abc4 to your computer and use it in GitHub Desktop.
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