R Studio won't open Tidyverse Librart

Hi all. I am very new to R. I watched videos that prompted me to install tidyverse, and so I did.

However, once I type library(tidyverse), I get the following:

library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘scales’

I had gotten this before with other packages and had installed them, but with scales the following code shows up:

> install.packages("scales")
  There is a binary version available but the source version is later:
       binary source needs_compilation
scales  1.1.0  1.1.1             FALSE
installing the source package ‘scales’
trying URL 'https://cran.rstudio.com/src/contrib/scales_1.1.1.tar.gz'
Content type 'application/x-gzip' length 515201 bytes (503 KB)
==================================================
downloaded 503 KB
dyld: lazy symbol binding failed: Symbol not found: _utimensat
  Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libR.dylib (which was built for Mac OS X 10.13)
  Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _utimensat
  Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libR.dylib (which was built for Mac OS X 10.13)
  Expected in: /usr/lib/libSystem.B.dylib
/Library/Frameworks/R.framework/Resources/bin/INSTALL: line 34:  2698 Done                    echo 'tools:::.install_packages()'
      2699 Abort trap: 6           | R_DEFAULT_PACKAGES= LC_COLLATE=C "${R_HOME}/bin/R" $myArgs --no-echo --args ${args}
Warning in install.packages :
  installation of package ‘scales’ had non-zero exit status
The downloaded source packages are in	‘/private/var/folders/b3/xjv5q5c96ls7_jg6zzvpq5y80000gn/T/Rtmp9NtT9G/downloaded_packages’

I've tried deleting and re-downloading R studio, but still no luck. Any help would be greatly appreciated. Thanks :slight_smile:

Did you try installing the binary version ?

To compile package from source, you need to have some more component on your computer. Do you have them ?
See
https://rstats.wtf/set-up-an-r-dev-environment.html#macos-system-prep

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