I need some help in correctly installing R and Knitting the docs

sh: /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/pandoc: Bad CPU type in executable Error in strsplit(info, "\n")[[1]] : subscript out of bounds Calls: ... pandoc_available -> find_pandoc -> lapply -> FUN -> get_pandoc_version In addition: Warning message: In system(paste(shQuote(path), "--version"), intern = TRUE) : running command ''/Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/pandoc' --version' had status 126 Execution halted..

I get this error message if I try to knit my docs into pdf. I have m2 MacBook Air. CAN ANYONE HELP ME PLEASE.

Has two solutions: Rosetta, which the developers recommend, and what I did on my M1, which met with disapproval from the developers.

1 Like

What is Rossetta? Is that a package?

Details are in the link; it's a systems level program that allows the Silicon processor to interpret code written for the old Intel-based Macs. It's probably a better fix than mine because there is less to go wrong with users who aren't familiar with use of command line tools.

1 Like

I wish that were all there is to it. The RStudio app includes its own version under the R.App tree, and that’s where it looks by default. It won’t use a version installed from homebrew (or preferably the pkg from pandoc.org) without tinkering with Renviron, which isn’t terribly hard with some prior experience and understanding about how $PATH variables work in the command line shell. But for a novice, it’s easy to dig a hole that it’s hard to climb out of.

1 Like

I will make a note of this and will see if this works

1 Like

Thanks bud. I appreciate it

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.