Issues with 'rlang' using R 3.5.3 on macOS Mojave

Hello, I've been having issues loading 'car' and 'ggplo2' they all seem to point to the same error message
Error: package or namespace load failed for ‘car’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
namespace ‘rlang’ 0.2.2 is already loaded, but >= 0.3.1 is required
installing the source package ‘rlang’

However, when I try updating 'rlang' to a new version I get this error message. Any suggestions?

trying URL ''
Content type 'application/x-gzip' length 858244 bytes (838 KB)

downloaded 838 KB

  • 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.5/Resources/library/rlang’
  • restoring previous ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rlang’
    Warning in install.packages :
    installation of package ‘rlang’ had non-zero exit status

The downloaded source packages are in

Do you have xcode installed in your system? You need it for compiling packages on MacOS

xcode-select --install

Thank you for the link! This fixed my issue =)

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:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.