0

First day in R, no idea what I'm doing. Currently using RStudio on Mac and trying to use the tidyverse library.

Installing tidyverse

> install.packages("tidyverse")
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/tidyverse_1.3.0.tgz'
Content type 'application/x-gzip' length 433010 bytes (422 KB)
==================================================
downloaded 422 KB


The downloaded binary packages are in
    /var/folders/yv/j6pv1xn549bfzg_ycxq2ks500000gp/T//RtmpZaCocT/downloaded_packages

Using tidyverse

> 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/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'm not sure where to get started with this. Any pointers or help would be greatly appreciated

Dave_ed
  • 1
  • 1
  • maybe try the idea mentioned here: https://stackoverflow.com/a/59435940/6673446 – Nico Albers Apr 09 '20 at 14:19
  • Try `install.packages("tidyverse", dependenicies = TRUE)`. Verify that all of the dependencies are installed such as "Rcpp" and "rlang" – Dave2e Apr 09 '20 at 15:55

1 Answers1

0

You can try to update your packages.

> update.packages(repos='http://cran.rstudio.com/', ask=FALSE, checkBuilt=TRUE)

If it does not work you could try to reinstall Rcpp.

install.packages("Rcpp")

Good luck!

Romain
  • 19,910
  • 6
  • 56
  • 65
  • Thanks for the response, just ran through everything there and I'm still seeing the same error with tidyverse from above (too long to comment it again) – Dave_ed Apr 09 '20 at 13:41
  • @Dave_ed Sorry, have you tried to restart the R session? You could also try to perform a fresh R install. – Romain Apr 09 '20 at 13:56
  • Yeah, I restarted before trying to use tidyverse. I've tried a fresh R install already before my initial post, but it mightn't hurt to try again, thanks – Dave_ed Apr 09 '20 at 14:50
  • @Dave_ed maybe try uninstalling both `uninstall.packages(c("Rcpp", "tidyverse"))` and reinstall it `install.packages(c("Rcpp", "tidyverse"))` ... – Romain Apr 09 '20 at 15:09
  • thanks again for the response. I've uninstalled and re-installed R and RStudio and I'm still seeing the same error unfortunately – Dave_ed Apr 09 '20 at 15:39
  • I think you must not have `/usr/lib/libc++abi.dylib`. I guess it may have a link with MacOS Command Line Tools have a look at [this](https://stackoverflow.com/questions/9329243/how-to-install-xcode-command-line-tools) maybe it could help. – Romain Apr 09 '20 at 15:59