I had a trouble installing sf through a recommend OSX installation and I tried this CMD Install, command;
R CMD INSTALL ~/Documents/GitHub/sf --configure-args='-with-gdal-config=/usr/local/Cellar/gdal/2.4.1_1/bin/gdal-config -with-geos-config=/usr/local/Cellar/geos/3.7.2/bin/geos-config'
But I am still getting the same error regarding pros_api,
proj_api.h not found in standard or given locations
I have a Brew install PROJ6,
/usr/local/Cellar/proj/6.1.0/bin/cct
/usr/local/Cellar/proj/6.1.0/bin/cs2cs
/usr/local/Cellar/proj/6.1.0/bin/geod
/usr/local/Cellar/proj/6.1.0/bin/gie
/usr/local/Cellar/proj/6.1.0/bin/invgeod
/usr/local/Cellar/proj/6.1.0/bin/invproj
/usr/local/Cellar/proj/6.1.0/bin/proj
/usr/local/Cellar/proj/6.1.0/bin/projinfo
/usr/local/Cellar/proj/6.1.0/include/proj/ (9 files)
/usr/local/Cellar/proj/6.1.0/include/ (7 files)
/usr/local/Cellar/proj/6.1.0/lib/libproj.15.dylib
/usr/local/Cellar/proj/6.1.0/lib/pkgconfig/proj.pc
/usr/local/Cellar/proj/6.1.0/lib/ (3 other files)
/usr/local/Cellar/proj/6.1.0/share/man/ (8 files)
/usr/local/Cellar/proj/6.1.0/share/proj/ (12 files)
The installer does not see the brew installed proj6 even though /usr/local is ahead in the path. Is it possible to manually set a path to proj6 in CMD Install ?
We need to see the complete output of the configure step.
Here is the output of config.
output.txt
I'd suggest to update GDAL to 3.0.0, and use that with PROJ 6.1.0.
can't install GDAL 3.0.0 (from the source). I get the same error;
`checking for PROJ >= 6 library... checking for proj_create_from_wkt in -lproj... yes
checking proj.h usability... no
checking proj.h presence... no
checking for proj.h... no
configure: error: proj.h not found`
Well, that suggests that there is a problem with your PROJ installation, or you need to set --with-proj= arguments. Which might help with sf as well: do run ./configure --help in the sf directory.
Ok I specified a path to pros_api.h as follows;
R CMD INSTALL ~/Documents/GitHub/sf --configure-args='-with-gdal-config=//usr/local/Cellar/gdal/2.4.1_1/bin/gdal-config --with-proj=/usr/local/Cellar/proj/6.1.0/include/proj_api.h -with-geos-config=/usr/local/Cellar/geos/3.7.2/bin/geos-config'
But I am still getting the same error. Any suggestions for a workaround ?
Thanks.
I think it should be --with-proj=/usr/local/Cellar/proj/6.1.0/
I tried with --with-proj=/usr/local/Cellar/proj/6.1.0/ but still get the same error;
./configure: line 3648: pkg-config: command not found
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 did reinstall PROJ6 by brew but the same result.
The problem was not having a pkg-config. After installing it, sf was installed seamlessly.
Thanks.
The problem was not having a pkg-config. After installing it, sf was installed seamlessly.
Thanks.
Had the same issue. After brew install pkg-config, sf was installed. Thanks.
Most helpful comment
The problem was not having a pkg-config. After installing it, sf was installed seamlessly.
Thanks.