sf won't install for anyone on Posit Connect Server

When I wan to install using: remotes::install_github(repo = "r-spatial/sf"), I got the error:
checking GDAL: linking with --libs only... yes
checking GDAL: ~/share/gdal/pcs.csv readable... no
checking GDAL: checking whether PROJ is available for linking:... yes
checking GDAL: checking whether PROJ is available for running:... free(): invalid pointer
./configure: line 3651: 373984 Aborted (core dumped) ./gdal_proj
no
configure: error: OGRCoordinateTransformation() does not return a coord.trans: PROJ not available?
ERROR: configuration failed for package ‘sf’

  • removing ‘~/R/x86_64-pc-linux-gnu-library/4.4/sf’
  • restoring previous ‘~/R/x86_64-pc-linux-gnu-library/4.4/sf’

Any idea?

Looks like a change to the sf package is incompatible with the version of gdal installed in Posit Cloud. If you install a previous version, it installs successfully. For example:

remotes::install_github(repo = "r-spatial/sf", ref="a6e210e67a5eb0a88e378325b643d182b913e4ff")

FWIW, it looks like this is the change that introduced the incompatibility.

I fix the issue. The issue was related to " Multiple GDAL, GEOS and/or PROJ versions on your system"!

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.