Skip to content
Prev 12327 / 15075 Next

Updating some packages fails

Lee
To build sf from source you need the GDAL library.? The easiest way to 
install GDAL, as well as GEOS and PROJ, on a mac is with the framework 
from Kyng Chaos which you can find here: 
http://www.kyngchaos.com/software/frameworks

They are also available on Homebrew; brew search for gdal, proj and geos.

Assuming you install the frameworks from KyngChaos in the default 
locations, you can use the following R script to build sf from source:

    sf_config_args <- c(
    "--with-gdal-config=/Library/Frameworks/GDAL.Framework/Versions/2.1/unix/bin/gdal-config",
    "--with-geos-config=/Library/Frameworks/GEOS.Framework/Versions/3/unix/bin/geos-config",
    "--with-proj-include=/Library/Frameworks/PROJ.framework/Versions/4/unix/include",
    "--with-proj-lib=/Library/Frameworks/PROJ.framework/Versions/4/unix/lib",
    "--with-proj-share=/Library/Frameworks/PROJ.framework/Versions/4/unix/share/proj"
    )
    install.packages("sf", configure.args = sf_config_args)

Adjust the paths if you install GDAL, PROJ and GEOS to different locations.

Lee
On 1/11/18 12:26 PM, Manuel Sp?nola wrote: