Unable to create rmarkdown file

When I go to create an rmarkdown file, a box pops up saying "Creating R Markdown documents requires an updated version of the rmarkdown package. Do you want to install this package now?"
Once I click "yes" to install the package, I think it fails.

If I try to check the rmarkdown package in my library, it results in errors:

library(rmarkdown)
Error in readRDS(dest) : error reading from connection
In addition: Warning message:
In readRDS(dest) : lzma decoder needed more memory
Error in readRDS(dest) : error reading from connection
In addition: Warning message:
In readRDS(dest) : lzma decoder needed more memory
Error in readRDS(dest) : error reading from connection
In addition: Warning message:
In readRDS(dest) : lzma decoder needed more memory
Error in readRDS(dest) : error reading from connection
In addition: Warning messages:
1: In readLines(file, skipNul = TRUE) :
cannot open compressed file '/usr/local/lib/R/site-library/timeDate/DESCRIPTION', probable reason 'Cannot allocate memory'
2: In readRDS(dest) : lzma decoder needed more memory

I've tried to search other posts with similar issues, but none of their solutions helped. I'm using macOS Big Sur 11.5.2. I have literally zero experience with Rstudio or any sort of coding, but I have to use this program for a statistics class, so very clearly and basically explained answers would be greatly appreciated.

Following what the error message is saying, it seems you have a version of htmltools that was installed with another R versions.

I would try to reinstall htmltools first. then install rmarkdown

That worked. Thank you so much!

1 Like

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.