Home > Enterprise >  Problem installing raster package for R 4.2.1 on Ubuntu 20.04
Problem installing raster package for R 4.2.1 on Ubuntu 20.04

Time:07-12

I'm attempting to install the raster package to be able to run a model in RStudio - I'm using Ubuntu 20.04, and R 4.2.1. Whenever I run install.packages('raster') in the RStudio console I get raster

terra


On Ubuntu 20.04, do the following.

Install GEOS

# Add the Ubuntu GIS PPA
sudo add-apt-repository ppa:ubuntugis/ppa

## update cache
sudo apt-get update

# Install the packages
sudo apt-get install software-properties-common geos

Install GDAL

sudo apt-get install libpq-dev gdal-bin libgdal-dev

Install PROJ

sudo apt-get install proj-bin

Install sqlite3

sudo apt install sqlite3

Only after these, can you do install.packages("raster") in R.

  • Related