I need to install sf
package for R in CentOS 7.
The repo versions of gdal
and proj
are less than the required for the package, so I installed them from source.
Even linking those libraries I always get the same error:
configure: GDAL: 3.2.0
checking proj.h usability... no
checking proj.h presence... no
checking for proj.h... no
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.
ERROR: configuration failed for package ‘sf’
I have tried different commands, and from diferent sources (CRAN, GitHub, locally) and always get the same error.
For example:
install_github("r-spatial/sf", configure.args="--with-gdal-config=/usr/local/gdal-3.2.0/bin/gdal-config --with-proj-lib=/usr/local/proj-7.2.0/lib --with-proj-include=/usr/local/proj-7.2.0/include")
proj_api.h
is present at the specified path:
locate proj_api.h
/usr/local/proj-7.2.0/include/proj_api.h