Having trouble installing and loading tidyverse/ readr - no rlang or hms package installation

Hi there, I am new to R and I have been trying to install the tidyverse package on my Macbook. I am currently on Mojave 10.14.6. I have followed the directions on https://cran.r-project.org/bin/macosx/ to download R. I have downloaded XQuartz and R-3.6.1 yet. When I am on Rstudios when trying to install my tidyverse package or readr, I get the error :


1 error generated.
make: *** [capture.o] Error 1
ERROR: compilation failed for package ‘rlang’

  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rlang’
    Warning in install.packages :
    installation of package ‘rlang’ had non-zero exit status
    ERROR: dependency ‘rlang’ is not available for package ‘hms’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/hms’
    Warning in install.packages :
    installation of package ‘hms’ had non-zero exit status

The downloaded source packages are in
‘/private/var/folders/qj/kz6bqfrd0t7d2zwq6993871m0000gq/T/RtmpTF5gt2/downloaded_packages’


I have xcode set as my default. I manually downloaded the rlang package and try to install it and I was not successful.

At this point I am just trying to figure out is there something that I am missing. Please let me know if there is anything I can do to get this to work.

Best Regards,
Jordan

Hi, and welcome!

This can happen if you don't have the XCode command line tools installed.

You can do this from the bash terminal with

xcode-select --install

If you get an error message, go to the app store and download XCode.

If that doesn't get you on your way, come back and we'll look for some other reason.

1 Like

YOU are a life saver!!! Thank you so much that fixed everything!

Great! Please mark this as a solution to help future pilgrims with the same problem.