About two hours ago, all of my code was working fine, and all of a sudden (without having changed anything) my computer (which is a Mac) is unable to load tidyverse or ggplot2, and it is saying it's due to the fact that the package 'vctrs' is missing. When I try to install this package, it gives me this error.
Error Message:
`installing the source package ‘vctrs’
trying URL 'https://cran.rstudio.com/src/contrib/vctrs_0.5.1.tar.gz' Content type 'application/x-gzip' length 959562 bytes (937 KB)
downloaded 937 KB
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/Resources/library/vctrs’ Warning in install.packages : installation of package ‘vctrs’ had non-zero exit status
The downloaded source packages are in ‘/private/var/folders/gw/m0wl7fh17n59_zcbrnc5s6mw0000gn/T/RtmprjCBXC/downloaded_packages’`
I have not found a solution online, and I am worried I will mess up my computer more if I start going into XCode. I have tried updating all of my packages, I have updated my computer, I have deleted and reinstalled RStudio, and I have downloaded an older version of RStudio. None of these suggested solutions have fixed anything. I would appreciate any help or insight!