Can't make new rmarkdown

I was trying to create a new Rmarkdown file, but I kept on getting pop-ups : " Creating R Markdown documents requires an updated version of the rmarkdown and xfun package.

Do you want to install this package now?"

I've clicked yes but the same thing happens. All my packages has been updated .

After some browsing, I managed to stop the problem with xfun. I tried to delete rmarkdown and manually re-install it. It gave me an error message:

any help please?

Best guess is you need to install the {bslib} package. It looks like it failed to install.

I tried downloading {bslib} and

Do you want to install from sources the package which needs compilation?

Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace ‘htmltools’ 0.5.2 is being loaded, but >= 0.5.7 is required
Calls: ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘bslib’

  • removing ‘/Users/rachailauliasadila/Library/R/4.0/library/bslib’
    Warning in install.packages :
    installation of package ‘bslib’ had non-zero exit status

It looks like you need to install {htmltools}

It might be easier to do

update.packages(ask = FALSE, checkBuilt = TRUE)

and then try bslib}. I get the feeling that a number of your packages are a bit out of date.

I tried to do that and update other packages too, but now the errors are:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

For context, I only use RStudio when I have a uni project, and I haven't used it for almost a year now (which might be why the packages are out of date). I updated to masOS 13.2 and this is my first time using RStudio ever since the update.

It looks like you need to install xcrun at system level. The system update looks to be one of the problems but I am not a Mac user.

I downloaded xcode command line tools and it seemed to fix the problem, thank you very much!!

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.