Cannot create a new Rmarkdown file.

When I attempt to create a new Rmarkdown file I am presented with a pop-up window that says:

"Install Require Packages: Creating R Markdown documents requires updated versions of the following packages: jsonlite, markdown, rmarkdown. Do you want to install these packages>?"

I click Yes. They install. Then I re-attempt creating a new Rmarkdown file and the same window pops-up.

I have re-downloaded Rstudio and updated R from cran.revolutionanalytics.com

Not sure what to do next...

(Rscript opens, but not Rmarkdown)

The packages are not being installed successfully, please try to install them manually and post the complete console output you get.

install.packages(c("jsonlite" , "markdown" ,  "rmarkdown"))

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
ERROR: compilation failed for package ‘jsonlite’

  • removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/jsonlite’

You are trying to install the latest package versions that currently are only available as source code, for that you need to install Xcode in your system (not in R) and the recommended development tools for macOS systems.
https://mac.r-project.org/tools/

You could also try installing binary versions by answering "no" when you are asked whether to install from source.

This topic was automatically closed 21 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.