After updating RStudio I am receiving the following message when trying to load packages. The error below is specific to ggplot2 but the same thing happens no matter what package I'm trying to load.
Error: package or namespace load failed for ‘ggplot2’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Users/barrylesht/Library/R/x86_64/4.2/library/glue/libs/glue.so':
dlopen(/Users/barrylesht/Library/R/x86_64/4.2/library/glue/libs/glue.so, 0x0006): Library not loaded: '/Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libR.dylib'
Referenced from: '/Users/barrylesht/Library/R/x86_64/4.2/library/glue/libs/glue.so'
Reason: tried: '/Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libR.dylib' (no such file), '/usr/local/lib/libR.dylib' (no such file), '/usr/lib/libR.dylib' (no such file)
For some reason RStudio seems to be trying the 4.0 library instead of the 4.2 library. How can I fix this?