Reputation: 41
When I tried to knit Rmarkdown file to a work file, I got an error like this:
sh: /usr/local/bin/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 ''/usr/local/bin/pandoc' --version' had status 126 Execution halted
Before, I can knit it. I didn't make any changes in settings but failed now. I use MacBook and my Rstudio version is 1.2.5019.
Upvotes: 4
Views: 2860
Reputation: 621
A possible cause is that you have installed Pandoc before (most likely via Homebrew), and that version did not work with the new version of macOS.
If that was the case, you could either uninstall pandoc (brew remove pandoc pandoc-citeproc
) as RStudio already bundled Pandoc, or update your Pandoc version (brew update && brew upgrade
). Check the Pandoc homepage for uninstall/updating instructions in case you do not use homebrew.
It's suggested to use the RStudio bundled version if you only use Pandoc indirectly via R Markdown.
Upvotes: 2