@jrmuirhead - I am encountering the same problem with geopackages. Have you found any fixes?
I have two different Rprojects, each with its own renv. Both run on sf 0.9-6, but link to different versions of gdal and proj (no idea how I managed that). One links to GDAL 3.2.0 and PROJ 7.2.0 (crashes) and one links to GDAL 3.1.1 and PROJ 6.3.1 (works).
I am reading in the exact same geopackage file (using sf::st_read(). And even trying to write a geopackage will make one of them fail.
I have tried, without luck, reverting the version of gdal, but can't get homebrew to do that for me. Any help would be appreciated!
I am running Big Sur on Mac, but here are the session infos for the one crashing:
R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS 10.16
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/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 datasets utils methods base
other attached packages:
[1] sf_0.9-6 ggplot2_3.3.2
loaded via a namespace (and not attached):
[1] Rcpp_1.0.5 pillar_1.4.6 compiler_4.0.2
[4] class_7.3-17 tools_4.0.2 digest_0.6.25
[7] evaluate_0.14 lifecycle_0.2.0 tibble_3.0.3
[10] gtable_0.3.0 pkgconfig_2.0.3 rlang_0.4.7
[13] DBI_1.1.0 rstudioapi_0.11 yaml_2.2.1
[16] xfun_0.15 e1071_1.7-3 knitr_1.29
[19] withr_2.2.0 dplyr_1.0.0 generics_0.0.2
[22] vctrs_0.3.2 classInt_0.4-3 rprojroot_1.3-2
[25] grid_4.0.2 tidyselect_1.1.0 glue_1.4.1
[28] here_0.1 R6_2.4.1 rmarkdown_2.3
[31] wesanderson_0.3.6 purrr_0.3.4 magrittr_1.5
[34] backports_1.1.8 scales_1.1.1 ellipsis_0.3.1
[37] htmltools_0.5.0 units_0.6-7 colorspace_1.4-1
[40] renv_0.11.0 KernSmooth_2.23-17 munsell_0.5.0
[43] crayon_1.3.4
And the one not crashing:
R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS 10.16
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/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 datasets utils methods base
other attached packages:
[1] sf_0.9-6
loaded via a namespace (and not attached):
[1] Rcpp_1.0.5 rstudioapi_0.11 magrittr_1.5
[4] units_0.6-7 tidyselect_1.1.0 munsell_0.5.0
[7] colorspace_1.4-1 R6_2.4.1 rlang_0.4.7
[10] stringr_1.4.0 startR_0.1.0 dplyr_1.0.2
[13] tools_4.0.2 grid_4.0.2 gtable_0.3.0
[16] KernSmooth_2.23-17 e1071_1.7-3 DBI_1.1.0
[19] class_7.3-17 ellipsis_0.3.1 tibble_3.0.3
[22] lifecycle_0.2.0 crayon_1.3.4 purrr_0.3.4
[25] ggplot2_3.3.2 vctrs_0.3.2 glue_1.4.2
[28] stringi_1.4.6 compiler_4.0.2 UnidecodeR_0.02
[31] pillar_1.4.6 generics_0.0.2 scales_1.1.1
[34] classInt_0.4-3 renv_0.11.0 pkgconfig_2.0.3
UPDATE
This is not a long-term solution, but worked to get me through the day. I copied the renv files for sf from the working project to the crashing project, and that did it. Both projects link back to GDAL 3.1.1, which can read geopackages. R still thinks it's running under 10.16. Any actual fixes are welcome.