Skip to content

Instantly share code, notes, and snippets.

@mdsumner
Last active July 31, 2017 05:14
Show Gist options
  • Save mdsumner/3a19a0e4342b4067decfc049b4f4ecf5 to your computer and use it in GitHub Desktop.
Save mdsumner/3a19a0e4342b4067decfc049b4f4ecf5 to your computer and use it in GitHub Desktop.
## to support github.com/hypertidyc/ncapi
## distilled from https://github.com/mdsumner/nectar/blob/master/r-spatial.sh
## - better would be Docker/Rocker, some geospatial parts
## key for apt-get update, see http://cran.r-project.org/bin/linux/ubuntu/README
## this echo must be done as root
echo 'deb https://cran.csiro.au/bin/linux/ubuntu xenial/' >> /etc/apt/sources.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
## TODO: hone to just what libnetcdf-dev needs
## updated GDAL - this assists NetCDF install by getting the OpenDAP pre-reqs
## https://launchpad.net/~ubuntugis/+archive/ubuntu/ubuntugis-unstable
add-apt-repository ppa:ubuntugis/ubuntugis-unstable --yes
apt update
apt upgrade --assume-yes
## Install 3rd parties
## NetCDF and geo-spatial wunderkind
## gdal obviously not needed, but not clear yet what that on-installs that helps NetCDF
apt install libnetcdf-dev proj-bin libproj-dev libgdal-dev gdal-bin libgeos-dev libssl-dev libudunits2-dev r-base r-base-dev --assume-yes
Rscript -e 'install.packages(c("Rcpp", "devtools", "RNetCDF", "ncdf4"), "/usr/local/lib/R/site-library")'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment