Skip to content

Install macOS Monterey v12.3.1 fails on missing gdal-config #1949

Closed
@qwertytam

Description

@qwertytam

Describe the bug
Install macOS Monterey v12.3.1 fails on missing gdal-config

To Reproduce
Trying to install sf on macOS Monterey v12.3.1 aarch64-apple-darwin21.3.0 with R version 4.2.0 using homebrew

Additional context
Have tried the following to resolve:

Each time I keep getting

checking for geos-config... no
no
configure: error: geos-config not found or not executable.

$ locate gdal-config gives

/opt/homebrew/Cellar/gdal/3.5.0/bin/gdal-config
/opt/homebrew/Cellar/gdal/3.5.0/share/man/man1/gdal-config.1
/opt/homebrew/bin/gdal-config
/opt/homebrew/share/man/man1/gdal-config.1

$ which gdal-config gives

/opt/homebrew/bin/gdal-config

$ gdal-config --version gives

3.5.0

So it looks like gdal is install correctly?

$ proj gives

Rel. 9.0.0, March 1st, 2022

So it looks like proj is install correctly?

Have done multiple restarts of R session.

Have this in .Reniron in my project folder

LIBRARY_PATH=/opt/homebrew/bin/

With the install then terminating unsuccessfully. Full console prints below. Any and all help appreciated!

`sessionInfo()`
R version 4.2.0 (2022-04-22)
Platform: aarch64-apple-darwin21.3.0 (64-bit)
Running under: macOS Monterey 12.3.1

Matrix products: default
LAPACK: /opt/homebrew/Cellar/r/4.2.0/lib/R/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.2.0 tools_4.2.0   

Trying to install rgeos

> install.packages("rgeos", repos="http://R-Forge.R-project.org", type="source")
Installing package into ‘/Users/tam/Library/R/arm64/4.2/library’
(as ‘lib’ is unspecified)
trying URL 'http://R-Forge.R-project.org/src/contrib/rgeos_0.5-10.tar.gz'
Content type 'application/x-gzip' length 280616 bytes (274 KB)
==================================================
downloaded 274 KB

* installing *source* package ‘rgeos’ ...
** using staged installation
configure: CC: clang
configure: CXX: clang++ -std=gnu++14
configure: rgeos: 0.5-10
checking for /usr/bin/svnversion... no
cat: inst/SVN_VERSION: No such file or directory
configure: svn revision: 
checking for geos-config... no
no
configure: error: geos-config not found or not executable.
ERROR: configuration failed for package ‘rgeos’
* removing ‘/Users/tam/Library/R/arm64/4.2/library/rgeos’
Warning in install.packages :
  installation of package ‘rgeos’ had non-zero exit status

The downloaded source packages are in
	‘/private/var/folders/4w/1gfqjwcd60sdlg02q277ll200000gn/T/RtmpCPAm07/downloaded_packages’

Trying to install rgdal gives

> install.packages("rgdal", repos="http://R-Forge.R-project.org", type="source")
Installing package into ‘/Users/tam/Library/R/arm64/4.2/library’
(as ‘lib’ is unspecified)
trying URL 'http://R-Forge.R-project.org/src/contrib/rgdal_1.5-32.tar.gz'
Content type 'application/x-gzip' length 4341872 bytes (4.1 MB)
==================================================
downloaded 4.1 MB

* installing *source* package ‘rgdal’ ...
** using staged installation
configure: R_HOME: /opt/homebrew/Cellar/r/4.2.0/lib/R
configure: CC: clang
configure: CXX: clang++ -std=gnu++14
configure: CFLAGS: -Wno-implicit-function-declaration
configure: CPPFLAGS: -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include
configure: CXXFLAGS: -g -O2
configure: LDFLAGS: -L/opt/homebrew/opt/gettext/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/xz/lib -L/opt/homebrew/lib
configure: LDFLAGS: -L/opt/homebrew/opt/gettext/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/xz/lib -L/opt/homebrew/lib
configure: CXX11 is: clang++, CXX11STD is: -std=gnu++11
configure: CXX is: clang++ -std=gnu++11
configure: C++11 support available
configure: rgdal: 1.5-32
checking for /usr/bin/svnversion... no
cat: inst/SVN_VERSION: No such file or directory
configure: svn revision: 
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/Users/tam/Library/R/arm64/4.2/library/rgdal’
Warning in install.packages :
  installation of package ‘rgdal’ had non-zero exit status

The downloaded source packages are in
	‘/private/var/folders/4w/1gfqjwcd60sdlg02q277ll200000gn/T/RtmpCPAm07/downloaded_packages’

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions