[R-SIG-Mac] sf installation problem under Mac OS 11 - Big Sur

Michal Ben-Nun mbennun @end|ng |rom pred@c|@com
Thu Aug 19 00:52:49 CEST 2021


Hi,

I installed R 4.10 on my Mac OS 11.3.1

I am trying to install 'sf' and 'rgdal'

From the mailing list I understood that this command should work:

install.packages(c("rgdal","sf"),,"https://mac.R-project.org
<https://mac.r-project.org/>")

However I am still getting an error, see below.

Any suggestions would be welcome.

Thanks,
Michal

p.s. I am using macports NOT brew

> install.packages(c("rgdal","sf"),,"https://mac.R-project.org")
Installing packages into ‘/Users/michal/Library/R/x86_64/4.1/library’
(as ‘lib’ is unspecified)
trying URL 'https://mac.R-project.org/src/contrib/rgdal_1.5-23.tar.gz'
Content type 'application/octet-stream' length 4393536 bytes (4.2 MB)
==================================================
downloaded 4.2 MB

trying URL 'https://mac.R-project.org/src/contrib/sf_1.0-2.tar.gz'
Content type 'application/octet-stream' length 3645982 bytes (3.5 MB)
==================================================
downloaded 3.5 MB

* installing *source* package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
** using staged installation
configure: R_HOME: /opt/local/Library/Frameworks/R.framework/Resources
configure: CC: /opt/local/bin/clang-mp-12
configure: CXX: /opt/local/bin/clang++-mp-12 -std=gnu++14
configure: CFLAGS: -pipe -Os
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64
configure: CPPFLAGS: -I/opt/local/include
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk
configure: CXXFLAGS: -pipe -Os -stdlib=libc++
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64
configure: LDFLAGS: -L/opt/local/lib -Wl,-headerpad_max_install_names
-Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch
x86_64
configure: LDFLAGS: -L/opt/local/lib -Wl,-headerpad_max_install_names
-Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch
x86_64
configure: CXX11 is: /opt/local/bin/clang++-mp-12, CXX11STD is: -std=gnu++11
configure: CXX is: /opt/local/bin/clang++-mp-12 -std=gnu++11
configure: C++11 support available
configure: rgdal: 1.5-23
checking for /usr/bin/svnversion... no
configure: svn revision: 1121
checking for gdal-config... /opt/local/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 3.3.0
checking GDAL version >= 1.11.4... yes
checking GDAL version <= 2.5 or >= 3.0... yes
checking GDAL: linking with --libs only... yes
checking GDAL: gdal-config data directory readable... yes
checking GDAL: /opt/local/share/gdal/stateplane.csv readable... yes
configure: pkg-config proj not available
  set PKG_CONFIG_PATH to the directory containing proj.pc
configure: PROJ version not determined using pkg-config proj
configure: PROJ CPP flags:  -I/opt/local/include
configure: PROJ LIBS:  -lproj
checking PROJ header API:... yes
configure: API to be used as yet undetermined, searching ...
configure: error: API to be used not found
ERROR: configuration failed for package ‘rgdal’
* removing ‘/Users/michal/Library/R/x86_64/4.1/library/rgdal’
* installing *source* package ‘sf’ ...
** package ‘sf’ successfully unpacked and MD5 sums checked
** using staged installation
configure: CC: /opt/local/bin/clang-mp-12
configure: CXX: /opt/local/bin/clang++-mp-12 -std=gnu++11
checking for gdal-config... /opt/local/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 3.3.0
checking GDAL version >= 2.0.1... yes
checking for gcc... /opt/local/bin/clang-mp-12
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /opt/local/bin/clang-mp-12 accepts -g... yes
checking for /opt/local/bin/clang-mp-12 option to accept ISO C89... none
needed
checking how to run the C preprocessor... /opt/local/bin/clang-mp-12 -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking gdal.h usability... yes
checking gdal.h presence... yes
checking for gdal.h... yes
checking GDAL: linking with --libs only... yes
checking GDAL: /opt/local/share/gdal/pcs.csv readable... no
checking GDAL: checking whether PROJ is available for linking:... yes
checking GDAL: checking whether PROJ is available fur running:... yes
configure: GDAL: 3.3.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’
* removing ‘/Users/michal/Library/R/x86_64/4.1/library/sf’

The downloaded source packages are in
‘/private/var/folders/07/47hs0f_j187393z5drwshbm00000gn/T/RtmpsD9V5a/downloaded_packages’
Warning messages:
1: In install.packages(c("rgdal", "sf"), , "https://mac.R-project.org") :
  installation of package ‘rgdal’ had non-zero exit status
2: In install.packages(c("rgdal", "sf"), , "https://mac.R-project.org") :
  installation of package ‘sf’ had non-zero exit status

	[[alternative HTML version deleted]]



More information about the R-SIG-Mac mailing list