Cannot install terra package on R-4.3.1 with Amazon Linux 2

Hi Team,

WE are not able to install "terra" package in R-4.3.1 . OS Distribution " Amazon Linux2". Even for Centos 7/RHEL 7 . we have no binary available for this combination.

The system requirements of the terra package are

C++17, GDAL (>= 2.2.3), GEOS (>= 3.4.0), PROJ (>= 4.9.3), sqlite3

A stock Amazon Linux 2 or CentOS/RHEL 7 install does not fulfill that. Getting a newer compiler that supports C++17 should be possible via devtoolsets, but there is no canonical source for newer RPMs of GDAL et al. I know that PostgreSQL offers such a repository. It should also be possible to use packages from Springdale Linux. If that fails, you could still compile GDAL et al. from source. You will have to compile the terra package from source.

Summary: While it is possible to get terra working on such an old OS, it is definitely preferred to update to something more recent.

1 Like

I only can second what my colleague @rstub already mentioned, just wanted to share a few more details.

Again as mentioned by @rstub, the above will get you going on Amazon Linux 2 - the by far best option however that avoids all of this extra technical work is to use a much more up-to-date linux distribution.

Thank you for the suggestions. We have installed gdal, proj and sqlite3 in the OS. We are able to install the terra package in R- 4.2.2 , 4.2.1, 4.2.0 and on ...

We are not able to install only in version R-4.3.1 version.

Can you post the output you get when calling install.pacakges("terra")?