I'm trying to install sf
on my new computer (M2 MacBook Air). It seems to install fine, but when I try to load it, I keep running into this error:
> library(sf)
Error: package or namespace load failed for ‘sf’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/proxy/libs/proxy.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/proxy/libs/proxy.so, 0x0006): tried: '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/proxy/libs/proxy.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/proxy/libs/proxy.so' (no such file), '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/proxy/libs/proxy.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
I unfortunately don't understand much of what that means. I'm running macOS Ventura, with R version 4.2.2. I've tried installing GDAL, geos and proj, and rgdal with Homebrew, and a number of other fixes I've seen, but nothing seems to work. Any advice or direction would be appreciated! Thanks!