I am using Mac OS Monterey Version 12.5, the latest versions of R (4.2.1), R Studio (2022/07, 1-554), and Quarto (1.0.38), and the `rmarkdown` package (2.14). When attempting to render Quarto (the given `hello.qmd` file), I see the following error:

```
Error in assignInNamespace("htmlPreserve", htmlPreserve, ns = "htmltools") : 
  could not find function "assignInNamespace"
Calls: .main -> source -> withVisible -> eval -> eval
Execution halted
Error in packageVersion("rmarkdown") : 
  could not find function "packageVersion"
Calls: cat -> paste0
Execution halted

Unable to locate an installed version of R.
Install R from https://cloud.r-project.org/
```
What I have done so far to try to address this issue:
1) Tried to manually set the PATH to the R library(s): https://community.rstudio.com/t/adding-to-the-path-variable/12066
```
old_path <- Sys.getenv("PATH")

Sys.setenv(PATH = paste(old_path, "/Library/Frameworks/R.framework/Resources/library", sep = ":"))
```
2) Tried to override QUARTO_R to (what I believe) is the directory R is in (consulting this [issue](https://community.rstudio.com/t/render-with-quarto-error/134403)).

`Sys.setenv('QUARTO_R' = '/Library/Frameworks/R.framework/Resources')`

FYI, R is working otherwise fine. I am able to use it as normal, so R Studio itself can clearly recognize that its there.
 
Render is working just fine on my work desktop, which is running an older version of R (4.1.1), but which is otherwise the same (updated OS, RStudio, and Quarto). The only thing I can think of is that on my laptop, there is something problematic going on with administrator privileges. However, I am not sure how to tinker in Terminal to identify the error and set appropriate paths.

Any assistance is greatly appreciated!
2022-08-09T17:22:38Z
EOneita
closed
unable to find R installation
https://github.com/quarto-dev/quarto-cli/issues/1765