Problems updating packages (R 4.0.2 in Mac)


I am trying to update some packages, but I am getting an error:
Do I need to install a package to help them compile them? What would you recommend me to do in general? Thanks very much for your time

R version 4.0.2 (2020-06-22) -- "Taking Off Again"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin17.0 (64-bit)

install.packages(c("fs", "mnormt", "openssl", "roxygen2"))

There are binary versions available but the source versions are later:
binary source needs_compilation
fs 1.4.1 1.4.2 TRUE
mnormt 2.0.0 2.0.1 TRUE
openssl 1.4.1 1.4.2 TRUE
roxygen2 7.1.0 7.1.1 TRUE

Do you want to install from sources the packages which need compilation? (Yes/no/cancel) Yes
installing the source packages ‘fs’, ‘mnormt’, ‘openssl’, ‘roxygen2’

trying URL ''
Content type 'application/x-gzip' length 819583 bytes (800 KB)

downloaded 800 KB

  • installing source package ‘fs’ ...
    ** package ‘fs’ 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
    ERROR: compilation failed for package ‘fs’
  • removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/fs’
  • restoring previous ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/fs’
    Warning in install.packages :
    installation of package ‘fs’ had non-zero exit status

The downloaded source packages are in

The easiest solution would be to answer "no" to this question, you would get a precompiled binary version that is a little older but much easier to install.
If you need to install the latest version from source, then you need to install Xcode in your system (not in R) and the recommended development tools for macOS systems.

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