I'm not entirely new to R, but I am also not well-versed in resolving back-end issues.
I have R Version 2023.03.2+454 (2023.03.2+454). I updated it about a month ago and the issues began.
I'm using a MacOS Sonoma 14.0 system.
I'm trying
install.packages(gtsummary)
This is an end snipped of the error code it gives me:
Warning in install.packages :
installation of package ‘rlang’ had non-zero exit status
* installing *source* package ‘xfun’ ...
** package ‘xfun’ 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 ‘xfun’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/xfun’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/xfun’
Warning in install.packages :
installation of package ‘xfun’ had non-zero exit status
* installing *source* package ‘vctrs’ ...
** package ‘vctrs’ 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 ‘vctrs’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/vctrs’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/vctrs’
Warning in install.packages :
installation of package ‘vctrs’ had non-zero exit status
ERROR: dependency ‘V8’ is not available for package ‘juicyjuice’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/juicyjuice’
Warning in install.packages :
installation of package ‘juicyjuice’ had non-zero exit status
* installing *source* package ‘knitr’ ...
** package ‘knitr’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** demo
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace ‘xfun’ 0.37 is being loaded, but >= 0.39 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘knitr’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/knitr’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/knitr’
Warning in install.packages :
installation of package ‘knitr’ had non-zero exit status
* 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
ERROR: compilation failed for package ‘tibble’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/tibble’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/tibble’
Warning in install.packages :
installation of package ‘tibble’ had non-zero exit status
* installing *source* package ‘dplyr’ ...
** package ‘dplyr’ 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 ‘dplyr’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/dplyr’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/dplyr’
Warning in install.packages :
installation of package ‘dplyr’ had non-zero exit status
ERROR: dependency ‘juicyjuice’ is not available for package ‘gt’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/gt’
Warning in install.packages :
installation of package ‘gt’ had non-zero exit status
ERROR: dependency ‘gt’ is not available for package ‘gtsummary’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/gtsummary’
Warning in install.packages :
installation of package ‘gtsummary’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/2k/0wblmqgn5_zd2hwclks8cy9w0000gn/T/Rtmp6ByUwe/downloaded_packages’
> library("gtsummary")
Error in library("gtsummary") : there is no package called ‘gtsummary’```
I've tried updating all packages and restarting R with no success in resolving it.
This is as far as my knowledge goes.
Help?