library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/4.2/Resources/library/dplyr/libs/dplyr.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.2/Resources/library/dplyr/libs/dplyr.so, 0x0006): Library not loaded: '/Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libR.dylib'
Referenced from: '/Library/Frameworks/R.framework/Versions/4.2/Resources/library/dplyr/libs/dplyr.so'
Reason: tried: '/Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libR.dylib' (no such file), '/usr/local/lib/libR.dylib' (no such file), '/usr/lib/libR.dylib' (no such file)
sessionInfo()
R version 4.2.2 (2022-10-31)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.6.2
I think this is hardly related to the RStudio IDE, just to confirm, can you try loading the package from an R console? Does it get loaded successfully that way? (without RStudio, just from R).
Closed RStudio and ran in R: library(tidyverse)
and got the error:
Error: package or namespace load failed for ‘tidyverse’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/4.2/Resources/library/dplyr/libs/dplyr.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.2/Resources/library/dplyr/libs/dplyr.so, 0x0006): Library not loaded: '/Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libR.dylib'
Referenced from: '/Library/Frameworks/R.framework/Versions/4.2/Resources/library/dplyr/libs/dplyr.so'
Reason: tried: '/Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libR.dylib' (no such file), '/usr/local/lib/libR.dylib' (no such file), '/usr/lib/libR.dylib' (no such file)
So I am in the wrong forum with my question!
Thanks for the guidance
Solved my problem by Help in R. Under " 4.2 Uninstalling under macOS" I found a Terminal script: sudo rm -Rf /Library/Frameworks/R.framework /Applications/R.app
/usr/local/bin/R /usr/local/bin/Rscript
this removes both ( R for macOS consists of two parts: the GUI (R.APP) and the R framework.) If you want to get rid of R more completely using a Terminal, simply run: The script above.
Running RStudio Version 2022.12.0+353 (2022.12.0+353) went smooth.
Thanks again to @andresrcs for pointing me in the right direction