I want to use the "readxl" package. But every time I try it says I dont have the "rlang" package installed. I have tried to install the package but i get this error each time:
installing the source package ‘rlang’
trying URL 'https://cran.rstudio.com/src/contrib/rlang_0.4.8.tar.gz'
Content type 'application/x-gzip' length 847517 bytes (827 KB)
==================================================
downloaded 827 KB
* installing *source* package ‘rlang’ ...
** package ‘rlang’ 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 ‘rlang’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rlang’
Warning in install.packages :
installation of package ‘rlang’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/x9/kf9z5_h5525bh3fdrf1dnsm00000gn/T/RtmptThXSw/downloaded_packages’
From your post, it seems rlang is currently only available to install from source (or maybe you are omitting something), which means it requires compilation, for compiling packages on macOS you need to install Xcode in your system (not in R) and the recommended development tools for macOS systems. https://cran.r-project.org/bin/macosx/tools/
If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it: