Pandoc error 6, mulitple versions of pandoc?

I'm having some problems with rmarkdown and pandoc. Some of my rmarkdown files are compiling and some are throwing error messages. I can't figure out a consistent trigger, I literally have had two files with identical YAML headers and one will compile while the other won't. I think the problem is caused by my having installed pandoc independently of RStudio, the problem goes away when I uninstall pandoc (following directions here:

The problems started when I wanted to include tables of contents in github_document output, and was having issues with the TOC not showing, so following this thread ( I updated pandoc. Unfortunately, that triggered the arbitrary error 6 messages.

If I uninstall pandoc all of my rmd files compile, but I don't get the TOC created. Any suggestions?

Running rmarkdown::pandoc_version() gives ‘2.3.1’ without having separately installed pandoc.
Once I install pandoc myself it shows ‘’

> sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.6

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.6.0 tools_3.6.0   

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.