0

I've been trying to install Bchron for use with my dissertation data, and tibble is apparently one of the dependencies it needs. I'm fairly new to R so don't understand most of this, but I get pretty much the same error whether I try to install Bchron, tidyverse, or just tibble alone. Here's the error text (apologies if it's not conventionally formatted); any help would be appreciated:

Installing tibble [3.1.1] ...
    FAILED
Error installing package 'tibble':
==================================

* installing to library ‘/Users/timdennehymac/Dropbox (Personal)/Dissertation/Chronology/Bchron3_TY/renv/staging/1’
* installing *source* package ‘tibble’ ...
** package ‘tibble’ successfully unpacked and MD5 sums checked
** using staged installation
** libs

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

ERROR: compilation failed for package ‘tibble’

* removing ‘/Users/timdennehymac/Dropbox 
(Personal)/Dissertation/Chronology/Bchron3_TY/renv/staging/1/tibble’

Error: install of package 'tibble' failed [error code 1]

In addition: Warning messages:

1: /usr/bin/xcrun --find --show-sdk-path returned exit code 1 

2: In system2(R(), args, stdout = TRUE, stderr = TRUE) :
  running command ''/Library/Frameworks/R.framework/Resources/bin/R' CMD config CC 2>&1' had status 1

3: In if (eval(cond, envir = environment(dot))) return(eval(expr, envir = environment(dot))) :
  the condition has length > 1 and only the first element will be used

4: In if (eval(cond, envir = environment(dot))) return(eval(expr, envir = environment(dot))) :
  the condition has length > 1 and only the first element will be used
Phil
  • 7,287
  • 3
  • 36
  • 66

1 Answers1

0

The tibble package was updated yesterday to version 3.1.1.

There is not yet any binary available for this version, even on the Rstudio CRAN mirror so you will need to compile the package yourself.

Since you appear to be running MacOS, you will need to install the Xcode command line tools in order to be able to build packages.

Open terminal.app and type the following command:

xcode-select --install

Follow the on screen prompts.

Once the command line utilities have been installed. Close R, restart and try again.

Ian Campbell
  • 23,484
  • 14
  • 36
  • 57
  • I think that's only going to work if the proper Xcode version is already installed. Did Apple change the requirement that you register as a developer in order to get Xcode? – IRTFM Apr 19 '21 at 23:08
  • I could have sworn the last time I installed command line tools you didn’t need to install Xcode. I’m open to being proven wrong though. – Ian Campbell Apr 19 '21 at 23:21
  • What I find with Google and Apple Support searching: It used to be that you needed a developer account to get Xcode. Now you can either sign in to your developer account or you download it from the App Store, but you do need to get a new version every time there is a new macos major version. So I was wrong to the extent that a developer account is needed currently. I'm not sure how to _prove_ you wrong, but I would challenge you to find a method for installing CLTs without first having Xcode installed. – IRTFM Apr 20 '21 at 05:07
  • [This website](https://mac-how-to.gadgethacks.com/how-to/install-command-line-developer-tools-without-xcode-0168115/) seems to have screenshots that corroborate my recollection. [This website](https://macpaw.com/how-to/install-command-line-tools) and [this website](https://www.maketecheasier.com/install-command-line-tools-without-xcode/) also have similar instructions. – Ian Campbell Apr 20 '21 at 05:09
  • It appears that you can download the CTL separately, although you will also find a fair number of postings to various forums that show failure to be able to do so. These appear to be at times around system releases and that separate CLT packages are releases somewhat later than full Xcode releases. – IRTFM Apr 20 '21 at 05:27
  • Thanks for the help! I was able to install Xcode without any trouble (and without a dev account or the App store...) and that allowed me to install tibble. I'm now getting different errors when I try to load it, but that's the subject for another post... – Tim Dennehy Apr 21 '21 at 19:07