I recently updated RStudio to version 1.4.1106 for MaC. I have since had trouble updating various packages or reinstalling ones I had used on the old version. I always get a "had non-zero exit status" error, because of mistakes with dependent packages.
This happens for knitr, devtools and various other packages.
What's the best way forward?
Any tips welcome!
Here a sample of the code for what happens when installing the knitr package. (I edited out some bits at [...] to remove excessive links.)
> install.packages("knitr")
also installing the dependencies ‘highr’, ‘xfun’
There are binary versions available but the source versions are later:
binary source needs_compilation
highr 0.8 0.9 FALSE
xfun 0.12 0.22 FALSE
knitr 1.28 1.33 FALSE
installing the source packages ‘highr’, ‘xfun’, ‘knitr’
versuche URL 'https://cran.rstudio.com/src/contrib/highr_0.9.tar.gz'
Content type 'application/x-gzip' length 15188 bytes (14 KB)
==================================================
downloaded 14 KB
[...]
* installing *source* package ‘xfun’ ...
** Paket ‘xfun’ erfolgreich entpackt und MD5 Summen überprüft
** libs
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
ERROR: compilation failed for package ‘xfun’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/xfun’
Warning in install.packages :
installation of package ‘xfun’ had non-zero exit status
ERROR: dependency ‘xfun’ is not available for package ‘highr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/highr’
Warning in install.packages :
installation of package ‘highr’ had non-zero exit status
ERROR: dependencies ‘highr’, ‘xfun’ are not available for package ‘knitr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/knitr’
Warning in install.packages :
installation of package ‘knitr’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/0g/f87lw7wj4_z3f_5wdztmkw080000gn/T/Rtmp8Bm926/downloaded_packages’