Good afternoon,
I have been using R for a few days, within R studio, with no evident issues. The operating system is Mac OS 10.11 (El Capitan), R version 3.6.
Recently I tried to install the package swirl, and after failing to be loaded (it did download, but could not be added with the command library) I know cannot load most packages including all those in the tidyverse.
Depending on the package I try to load I get different error message, but all point (as far as I can understand) to an issue with libc++.1.dylib.
Some examples:
> library("tidyverse", lib.loc="/Library/Frameworks/R.framework/Versions/3.6/Resources/library")
Error: package or namespace load failed for ‘tidyverse’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/libs/Rcpp.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/libs/Rcpp.so, 6): Symbol not found: ___cxa_uncaught_exceptions
Referenced from: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libc++.1.dylib
Expected in: /usr/lib/libc++abi.dylib
in /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libc++.1.dylib
> library("ggplot2", lib.loc="/Library/Frameworks/R.framework/Versions/3.6/Resources/library")
Error: package or namespace load failed for ‘ggplot2’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/libs/Rcpp.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/libs/Rcpp.so, 6): Symbol not found: ___cxa_uncaught_exceptions
Referenced from: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libc++.1.dylib
Expected in: /usr/lib/libc++abi.dylib
in /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libc++.1.dylib
> library("rmarkdown", lib.loc="/Library/Frameworks/R.framework/Versions/3.6/Resources/library")
Error: package or namespace load failed for ‘rmarkdown’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/digest/libs/digest.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/digest/libs/digest.so, 6): Symbol not found: ___cxa_uncaught_exceptions
Referenced from: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libc++.1.dylib
Expected in: /usr/lib/libc++abi.dylib
in /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libc++.1.dylib
After reading similar questions on various fora, I tried to reinstall the packages Rcpp and digest; the problem persisted.
I uninstalled completely R and installed it again, but still the behavior is identical.
CORRECTION:
The file libc++.1.dylib as well as libc++abi.dylib are indeed located in /usr/lib/
The file libc++.1.dylib in /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/
...although I am pretty sure I do not completely understand what the error message I get is lamenting exactly.
What I am pretty sure about, is that my question is a basic one and it betrays my scarce understanding of the library mechanics of R, for which I apologize.
Thanks so much for your help.