Errors installing packages--rlang


#1

For some reason all of a sudden I can't install any packages including dplyr, readr, ggplot2. It seems to be a problem with rlang or tibble. I've tried manually installing rlang and also using

 install.packages("rlang", dependencies = TRUE). I get an error: 
* installing *source* package ‘rlang’ ... 
** package ‘rlang’ successfully unpacked and MD5 sums checked 
** libs 
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun 
ERROR: compilation failed for package ‘rlang’ 
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/rlang’ 
Warning in install.packages : 
installation of package ‘rlang’ had non-zero exit status

#2

From this gist, it sounds like you need to install XCode CLTs: