-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sf installation problem under Mac OS 11 - Big Sur #1536
Comments
https://twitter.com/opencpu/status/1326902988334657537?s=19
A known issue, and good advice not to upgrade until those who understand
Apple (I do not) confirm that it is safe to do so. Following R-sig-mac is
also advised https://stat.ethz.ch/mailman/listinfo/r-sig-mac.
Roger Bivand
Falsensvei 32
5063 Bergen
fre. 13. nov. 2020, 20:24 skrev codyevers <[email protected]>:
… Upgrading to Mac OS 11 - Big Sur appears to have created an issue in
installing and loading 'sf'. The issue seems specific to the 'rgdal'
package, which is looking for the library "libpq.5.dylib" which no longer
exists in "/usr/lib/". Found another post on the same problem here:
R-macos/recipes#14 <R-macos/recipes#14>, though
no solutions yet. Anyone have thoughts on how to resolve this?
Error reported in R when install sf and/or rgdal:
unable to load shared object
'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/sf/libs/sf.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.0/Resources/library/sf/libs/sf.so,
6): Library not loaded: /usr/lib/libpq.5.dylib
Referenced from:
/Library/Frameworks/R.framework/Versions/4.0/Resources/library/sf/libs/sf.so
Reason: image not found
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1536>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACNZ3BABGYG3AIHBKOF2M6LSPWBWTANCNFSM4TU62MQQ>
.
|
These steps worked for me ... PART 1: Using Terminal
2.1) Not sure it's necessary ... I included it on terminal.
PART 2: Using R
Restart R and tidycensus, rgdal, rgeos, and sf will load properly. |
Fantastic @abuabara. I can confirm that this fixed the problem on my end, and I assume will work for anyone else running into this issue after installing Mac OS 11 - Big Sur. Thanks for the quick fix! |
Hi there. I get this when running the last line of code:
I then tried this, but without success:
|
This is my brew less version... to fix the install of sf on macOS 11.0.1 (Big Sur) Note: change -j56 below in the code to the number of CPU on your machine macOS terminal
Back in R console
|
@thierrygosselin you should be really careful using If you're going to install GDAL manually, I much recommend using brew or another package manager, so that you can upgrade or uninstall the gdal files when you don't need them anymore. |
@jeroen not sure for GDAL, I'm barely using it, I need sf to run adegenet, and for 99% of the other genomics related packages and software I use, I see only advantages of using
Best, |
Thanks @abuabara - ran with a slight simplification. These steps worked for me ... PART 1: Using Terminal Using Homebrew, install gdal:
(Homebrew installs gdal, proj, and geos into a Cellar, and then symlinks these into the /usr/local/lib folder. You can ignore the postgres formula "keg only" warning produced when libpq is installed.) PART 2: Using R
|
In my case no need for restarting R. |
This problem is now fixed on CRAN. You can now install the sf and rgdal packages from CRAN in the regular way on MacOS big sur. |
I am having problems when installing packages in R
But I am sure that gdal proj geos have been installed by brew
So, what should I do next? |
Do not use source packages unless you can handle installation yourself, based on for example https://github.com/r-spatial/sf/#macos. In the rgeos case, |
- sf installation problem r-spatial/sf#1536
For a homebrew installation of proj, use this: install_github("r-spatial/sf", configure.args = "--with-proj-lib=/opt/homebrew/lib") |
No, it always depends on the architecture, so without stating which architecture, this advice is not accurate, since on M1 rosetta can be brought into play with the wrong path. Always best to use CRAN binaries only, also when installing from source. |
Upgrading to Mac OS 11 - Big Sur appears to have created an issue in installing and loading 'sf'. The issue seems specific to the 'rgdal' package, which is looking for the library "libpq.5.dylib" which no longer exists in "/usr/lib/". Found another post on the same problem here: R-macos/recipes#14, though no solutions yet. Anyone have thoughts on how to resolve this?
Error reported in R when install sf and/or rgdal:
The text was updated successfully, but these errors were encountered: