Update GEOS on RStudio Cloud

This is not about a specific project. I'm trying to install lwgeom for a project involving geospatial data, and the current CRAN version of lwgeom requires GEOS >= 3.6.0, but the version on RStudio Cloud is 3.5.1. I also tried to use devtools::install_version("lwgeom", version = "0.2-3"), and got this:

Downloading package from url: http://package-proxy/src/contrib/Archive/lwgeom/lwgeom_0.2-3.tar.gz
Installing package into ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/4.0’
(as ‘lib’ is unspecified)
* installing *source* package ‘lwgeom’ ...
** package ‘lwgeom’ successfully unpacked and MD5 sums checked
** using staged installation
configure: CC: gcc
configure: CXX: g++ -std=gnu++11
configure: pkg-config proj exists, will use it
checking proj_api.h usability... no
checking proj_api.h presence... no
checking for proj_api.h... no
configure: error: proj_api.h not found in standard or given locations.

I can't use sudo apt-get here. So how to update GEOS on RStudio Cloud?

I know this is a "wrong" answer, but {lwgeom} is a very brittle package. It breaks not only in RStudio Cloud, but in many Travis workflows as well. It is best avoided unless you have a good control of the machine on which it would be run (e.g. sudo rights).

I think RStudio should update the version of GEOS but in the meantime I was able to install an older version that meets current needs for tmap/sf devtools::install_version("lwgeom", "0.2-1")

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.