[R-SIG-Mac] Install sf from source on macOS 10.12 (Sierra)

Lee Godfrey lee at truthfromdata.com
Fri Jun 30 14:31:41 CEST 2017


After struggling to build and install sf on my Mac I thought providing the code chunk below would help others.

It assumes the GDAL 2.1 Complete framework from http://www.kyngchaos.com/software/frameworks <http://www.kyngchaos.com/software/frameworks> has been installed to /Library/Frameworks.  Modify the path as necessary if you have installed it elsewhere.

# build and install sf package from source with specified config for GDAL/GEOS/PROJ.4
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)


	[[alternative HTML version deleted]]



More information about the R-SIG-Mac mailing list