0

I have been attempting to download tidyverse all day with no luck. I am a newbie, but have searched for all sorts of remedies and nothing's done the trick yet. This is the initial error message I receive:

> 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 ‘colorspace’

Upon attempting to install colorspace I receive:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
ERROR: compilation failed for package ‘colorspace’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/colorspace’
Warning in install.packages :
  installation of package ‘colorspace’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/f9/rwtzxt9j7218k7k5vy3r03zm0000gn/T/RtmpFYYSDK/downloaded_packages’

No idea what to do about this, am happy to provide more info. Installing directly from the packages tab is also not working.

Phil
  • 7,287
  • 3
  • 36
  • 66
  • 1
    At your mac terminal, try typing `xcode-select --install` You need to have xcode installed and configured to build packages from source. you can also try `install.packages("colorpsace", type="binary")` if you don't want to compile (which I might recommend because it's less of a hastle) – MrFlick Jun 25 '21 at 00:58
  • Hey! Thank you for your response. Unfortunately I receive this error: ```> install.packages("colorpsace", type="binary") Warning in install.packages : package ‘colorpsace’ is not available as a binary package for this version of R A version of this package for your version of R might be available elsewhere, see the ideas at https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages``` – e_school Jun 25 '21 at 01:01
  • Oops. I typed the package name incorrectly. It should be `install.packages("colorspace", type="binary")`. the main point being use `type="binary"` when you use `install.packages` – MrFlick Jun 25 '21 at 01:03
  • No worries! What does this mean? ` There is a binary version available (and will be installed) but the source version is later: binary source colorspace 2.0-1 2.0-2 trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/colorspace_2.0-1.tgz' Content type 'application/x-gzip' length 2609394 bytes (2.5 MB) ================================================== downloaded 2.5 MB The downloaded binary packages are in /var/folders/f9/rwtzxt9j7218k7k5vy3r03zm0000gn/T//RtmpFYYSDK/downloaded_packages ` – e_school Jun 25 '21 at 01:04
  • Unfortunately it is 4.1. Downloaded it today! – e_school Jun 25 '21 at 01:07
  • The message means there are updated source files available for the pacakge that have not yet been compiled on CRAN. If you you want to install from source, you need to set your machine up to compile pacakges. Normally CRAN takes care of all of that for you. There is a small window after a new release when the CRAN binaries are behind. It's usually totally find just to install the binary version. – MrFlick Jun 25 '21 at 01:12
  • Ah ok. Sorry for all of these questions - but how would I do that? Does the same likely apply to all of tidyverse – e_school Jun 25 '21 at 01:15
  • Depending on the R package, installing from source on macOS can be quite challenging (e.g. instructions here: https://stackoverflow.com/a/65334247/12957340) - if there is a binary available it is often recommended you install the binary as MrFlick said in his first comment. – jared_mamrot Jun 25 '21 at 01:17
  • That message means that you did that. Tryin `library(tidyverse)` again. At the very least you should get a different error message if it doesn't work, but hopefully it will work. – MrFlick Jun 25 '21 at 01:17
  • Ah. Received this!: ``` ── Attaching packages ────────────────────────────────────────────────────────── tidyverse 1.3.1 ── ✓ ggplot2 3.3.4 ✓ purrr 0.3.4 ✓ tibble 3.1.2 ✓ dplyr 1.0.7 ✓ tidyr 1.1.3 ✓ stringr 1.4.0 ✓ readr 1.4.0 ✓ forcats 0.5.1 ── Conflicts ───────────────────────────────────────────────────────────── tidyverse_conflicts() ── x dplyr::filter() masks stats::filter() x dplyr::lag() masks stats::lag() ``` – e_school Jun 25 '21 at 01:21
  • Sorry, format of that is difficult to read: I received two "tidyverse conflicts" : x dplyr::filter() masks stats::filter() x dplyr::lag() masks stats::lag() – e_school Jun 25 '21 at 01:22
  • Those conflicts are fine. Everything is working. You've loaded the tidyverse. – MrFlick Jun 25 '21 at 01:42

0 Answers0