Error running filter pandoc-citeproc: Could not find executable pandoc-citeproc
Asked Answered
T

1

13

I am attempting to use R Markdown with papaja. I downloaded everything according to this website. I open an APA template, and click "knit". I get this error:

Error running filter pandoc-citeproc: Could not find executable pandoc-citeproc

I know that pandoc is working outside of R (I can run it in the terminal window). It appears it is on my computer, why can't R Markdown see it and use it? How might I change this to pandoc-citeproc? I have tried running

install pandoc-citeproc 

in my terminal window.

It then shows me this:

install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
           [-o owner] file1 file2
   install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
           [-o owner] file1 ... fileN directory
   install -d [-v] [-g group] [-m mode] [-o owner] directory ...

I then go back to R, restart my session, and get the same error. Any ideas?

I am running R Studio on a Mac.

Tiny answered 16/10, 2020 at 15:22 Comment(2)
Which pandoc version did you install? There has been a recent change in pandoc which folds the functionality of pandoc-citeproc into pandoc proper. If you downloaded pandoc 2.11, try upgrading your R Markdown installation or downgrade pandoc to version 2.10.1.Onder
Thank you for your help! I did this, now I am getting this error when I attempt to knit..! LaTeX Error: Option clash for package geometry. Error: LaTeX failed to compile APA_Template.tex. Execution haltedTiny
B
19

I was experiencing the same problem right after upgrading from Ubuntu 18.04 LTS to 20.04 LTS. Running knitr from RStudio to turn an RMarkdown file into HTML format. I found out the pandoc-citeproc program was not installed with the upgrade, so I had to install it.

I got the instructions from the package page: https://ubuntu.pkgs.org/20.10/ubuntu-universe-arm64/pandoc-citeproc_0.17.0.1-1build1_arm64.deb.html. Here I reproduce verbatim for quick reference:

  1. Update the package index:

    sudo apt-get update

  2. Install pandoc-citeproc deb package:

    sudo apt-get install pandoc-citeproc

Hope it works for anyone out there if you suddenly find your installation does not have all the pandoc-related packages that your workflow needs.

Boudicca answered 10/12, 2020 at 8:0 Comment(3)
The same basic method works for Fedora: sudo dnf install pandoc-citeprocRecurvate
This answer solves the same problem in Debian 11.Obit
@Obit that is good to know. I searched the origins of the package and pandoc-citeproc is a common package for Debian and Ubuntu. It provides citation formatting to pandoc, the Swiss army knife text processing program developed in Haskell. Debian 11 (Bullseye, oldstable) has version 0.17.0.1-1 [packages.debian.org/bullseye/pandoc-citeproc] while Ubuntu 20.04 (focal) has version 0.15.0.1-1build4 [packages.ubuntu.com/focal/pandoc-citeproc].Boudicca

© 2022 - 2024 — McMap. All rights reserved.