Skip to content

Instantly share code, notes, and snippets.

@kygoh
Created June 25, 2020 03:47
Show Gist options
  • Save kygoh/a65af61145cf3bf0713f5462554c542a to your computer and use it in GitHub Desktop.
Save kygoh/a65af61145cf3bf0713f5462554c542a to your computer and use it in GitHub Desktop.
Installing R, RPostgresql and GIS packages (rgdal, sf)
sudo apt upgrade
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/'
sudo apt update
sudo apt install r-base r-base-core r-recommended
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get -y install libudunits2-dev libfontconfig1-dev libcairo2-dev gdal-bin libgdal-dev proj-bin
sudo RScript -e 'install.packages("rgdal", repos="http://cran.r-project.org", dependencies=TRUE)'
sudo RScript -e 'install.packages("sf", repos="http://cran.r-project.org", dependencies=TRUE)'
sudo RScript -e 'install.packages("RPostgreSQL", repos="http://cran.r-project.org", dependencies=TRUE)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment