RStudio 2022.12.0+353 on Mac Monterey - library problems

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

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/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 utils datasets methods base

loaded via a namespace (and not attached):
[1] rstudioapi_0.14 magrittr_2.0.3 tidyselect_1.2.0 R6_2.5.1
[5] rlang_1.0.6 fansi_1.0.3 tools_4.2.2 utf8_1.2.2
[9] cli_3.5.0 remotes_2.4.2 tibble_3.1.8 lifecycle_1.0.3
[13] wrapr_2.0.9 vctrs_0.5.1 glue_1.6.2 compiler_4.2.2
[17] pillar_1.8.1 generics_0.1.3 pkgconfig_2.0.3

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

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.