Packages download to temp folder and are unable to load

I seem to be able to download the devtool package just fine, though it downloads to a temp folder even though I've specified the library directory. Though, when I try to load it, it tells me that "usethis" is required, so I download "usethis," and when I go to load it, I get Error: package or namespace load failed for ‘usethis’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object

This is what I'm running:

install.packages("devtools", lib = "/Library/Frameworks/R.framework/Versions/3.6/Resources/library", repos = "http://cran.us.r-project.org")
library(devtools)
install.packages("usethis", lib = "/Library/Frameworks/R.framework/Versions/3.6/Resources/library")
library(usethis)

The output:

> install.packages("devtools", lib = "/Library/Frameworks/R.framework/Versions/3.6/Resources/library", repos = "http://cran.us.r-project.org")
trying URL 'http://cran.us.r-project.org/bin/macosx/el-capitan/contrib/3.6/devtools_2.3.0.tgz'
Content type 'application/x-gzip' length 347771 bytes (339 KB)
==================================================
downloaded 339 KB


The downloaded binary packages are in
	/var/folders/bb/28dvh02j4jn6rtm54bfd1djh0000gn/T//Rtmp7WFOm2/downloaded_packages
> library(devtools)
Loading required package: usethis
Error: package or namespace load failed for ‘usethis’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Users/iMeek/Library/R/3.6/library/fs/libs/fs.so':
  dlopen(/Users/iMeek/Library/R/3.6/library/fs/libs/fs.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
 Show Traceback
 
 Rerun with Debug
 Error: package ‘usethis’ could not be loaded 
> install.packages("usethis", lib = "/Library/Frameworks/R.framework/Versions/3.6/Resources/library")
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/usethis_1.6.1.tgz'
Content type 'application/x-gzip' length 582431 bytes (568 KB)
==================================================
downloaded 568 KB


The downloaded binary packages are in
	/var/folders/bb/28dvh02j4jn6rtm54bfd1djh0000gn/T//Rtmp7WFOm2/downloaded_packages
> library(usethis)
 Show Traceback
 
 Rerun with Debug
 Error: package or namespace load failed for ‘usethis’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Users/iMeek/Library/R/3.6/library/fs/libs/fs.so':
  dlopen(/Users/iMeek/Library/R/3.6/library/fs/libs/fs.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 

Thank you!

The binaries get downloaded to a temp folder not the package itself.

Try reinstalling fs package

Also, please do not post screenshots here, post formatted code instead, here is how to do it.

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

Thanks for the feedback andresrcs, I edited the original post with formatted code.

Also, I tried removing and reinstalling the fs package with the same results when I try to load. Do you have any other suggestions?

> library("fs", lib.loc="~/Library/R/3.6/library")
 Show Traceback
 
 Rerun with Debug
 Error: package or namespace load failed for ‘fs’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Users/iMeek/Library/R/3.6/library/fs/libs/fs.so':
  dlopen(/Users/iMeek/Library/R/3.6/library/fs/libs/fs.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 

Thank you again.