How to fix error loading tidyverse library - r

I am having trouble loading the tidyverse library. I am new to R. After installing packages using:
install.packages("tidyverse",dependencies = TRUE)
No problem thus far... but then I try to load the tidyverse library:
library(tidyverse)
I get the following:
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
I have tried installing and uninstalling R, with no effect.
I'm using Version 1.1.463 – © 2009-2018 RStudio, Inc. for use with OS X El Capitan Version 10.11.4.

Related

Error loading Glimma and edgeR packages on Mac

we are trying to load the edgeR and Glimma packages on a Mac OS version 11.0. We have installed and loaded other packages successfully from Bioconductor including limma. It appears that the install of both was successful, but when trying to load the packages we get the following error messages:
library(edgeR)
Error: package or namespace load failed for ‘edgeR’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/edgeR/libs/edgeR.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/edgeR/libs/edgeR.so, 6): Symbol not found: __ZNKSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv
Referenced from: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/edgeR/libs/edgeR.so (which was built for Mac OS X 13.0)
Expected in: /usr/lib/libc++.1.dylib
> library(Glimma)
Error: package or namespace load failed for ‘Glimma’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/DESeq2/libs/DESeq2.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/DESeq2/libs/DESeq2.so, 6): Symbol not found: __ZNKSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv
Referenced from: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/DESeq2/libs/DESeq2.so (which was built for Mac OS X 13.0)
Expected in: /usr/lib/libc++.1.dylib
The RStudio version is 2022.12.0+353
The macOS is 11.2.2 BigSur

Error loading R package - libicui18n.so.68: cannot open shared object file

Until yesterday, I could run library(car) just fine. But after running yay -Syyu and upgrading as many packages as I can, this no longer works.
> library(car)
Loading required package: carData
Error: package or namespace load failed for ‘car’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/my-name/R/x86_64-pc-linux-gnu-library/4.0/stringi/libs/stringi.so':
libicui18n.so.68: cannot open shared object file: No such file or directory
I am running this on Arch Linux.
We can install the 'stringi' package
install.packages('stringi')

Caret package is not loading

I'm having problem with Caret package,
Please see the error below,
library(caret)
Error: package or namespace load failed for ‘caret’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/libs/Rcpp.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/libs/Rcpp.so, 6): Symbol not found: _EXTPTR_PTR
Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/libs/Rcpp.so
Expected in: /Library/Frameworks/R.framework/Resources/lib/libR.dylib
in /Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/libs/Rcpp.so
In addition: Warning message:
package ‘caret’ was built under R version 4.0.2
I am using macOS Catalina.
Thanks in advance,
Daniel
I had a similar issue when moving from 4.0 to 4.1 and reinstalling ggplot2
Basically when loading vctrs it was using the libR.dylib from the R.Framework 4.0 not the 4.1 (and I removed the 4.0)
>library(ggplot2)
Error: package or namespace load failed for ‘ggplot2’ in
dyn.load(file, DLLpath = DLLpath, ...): unable to load shared
object '/Users/xxxx/Library/R/4.1/library/vctrs/libs/vctrs.so':
dlopen(/Users/xxxx/Library/R/4.1/library/vctrs/libs/vctrs.so, 6):
Library not loaded:
/Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libR.dylib
Referenced from: /Users/lgzdl/Library/R/4.1/library/vctrs/libs/vctrs.so
Reason: image not found
My temporary solution has been to duplicate the 4.1 and renamed it 4.0. At, least for now > library(vctrs) is not throwing an error!
There must be a lingering reference to the R.Framework 4.0? somewhere?
I resolve this problem with latest release R-4.0.2.pkg in www.r-project.org -> Download -> CRAN and select your country.

Error loading prophet library in R - How can I fix it?

Can someone help me to solve the prophet library loading for Mac in R?
I have successfully installed the package, and when I try to load the library I get the following result:
> library(prophet)
> Error: package or namespace load failed for ‘prophet’
> in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared
> object
> '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/prophet/libs/prophet.so':
> dlopen(/Library/Frameworks/R.framework/Versions/4.0/Resources/library/prophet/libs/prophet.so,
> 6): Library not loaded: #rpath/libtbb.dylib Referenced from:
> /Library/Frameworks/R.framework/Versions/4.0/Resources/library/prophet/libs/prophet.so
> Reason: image not found
R version is R version 4.0.2, Built for Catalina
try library(rstan) before library(prophet)
https://github.com/facebook/prophet/issues/464

_OCIArrayDescriptorAlloc not found during ROracle installation

I am trying to install the ROracle library but I get this error:
Error: package or namespace load failed for ‘ROracle’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/ROracle/libs/ROracle.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.5/Resources/library/ROracle/libs/ROracle.so, 6): Symbol not found: _OCIArrayDescriptorAlloc
Referenced from: /Library/Frameworks/R.framework/Versions/3.5/Resources/library/ROracle/libs/ROracle.so
Expected in: flat namespace
in /Library/Frameworks/R.framework/Versions/3.5/Resources/library/ROracle/libs/ROracle.so
I tried to follow different approach like this but nevertheless I can't fix it.
I am using macOS Sierra 10.12.6 and R version 3.5.1.

Resources