pandoc version 1.12.3 or higher is required and was not found (R shiny)

后端 未结 10 2575
轮回少年
轮回少年 2020-11-29 02:09

I have a problem generating a pdf report from my app shiny which is hosted on a server.

the app works fine but when I press the button to download the report, I get

相关标签:
10条回答
  • 2020-11-29 02:42

    I was facing a similar issue in IntelliJ R plugin. I solved it by copying the pandoc file in ~/.IntelliJIdea2019.3/config/plugins/rplugin/pandoc

    0 讨论(0)
  • 2020-11-29 02:47

    The easiest way I solved this issue is to pass the Sys.setenv(..) command inside the crontab command prior to calling the RMarkdown::render. You need to separate the two commands with a semicolon:

    R -e "Sys.setenv(RSTUDIO_PANDOC='/usr/lib/rstudio-server/bin/pandoc'); rmarkdown::render('File.Rmd', output_file='output.html')"
    

    (Remember that the rstudio-server path differs from the non-server version)

    0 讨论(0)
  • 2020-11-29 02:50

    For those not using RStudio, you may just need to install pandoc on your system. For me it was

    sudo pacman -S pandoc
    

    and it worked (Arch Linux).

    0 讨论(0)
  • 2020-11-29 02:52

    If anyone is having this issue and also use anaconda, its possible they were having my issue. The rstudio shell does not load the .bashrc file when it starts up meaning if your version of pandoc is installed within anaconda Rstudio will not find it. Installing pandoc separately with a command like sudo pacman -S pandoc worked for me!

    0 讨论(0)
  • 2020-11-29 02:53

    I'm using Arch Linux, and RStudio as well.. the only thing that worked for me was:

    sudo pacman -S pandoc
    

    :)

    0 讨论(0)
  • 2020-11-29 02:56

    Hey I just beat this error. I solved this by deleting the 2 pandoc files, "pandoc" and "pandoc-citeproc" from the shiny-server folder. I then created a link for each of these files from the rstudio-server folder. It worked like a charm. This was an issue for me when I was trying to embed leaflet in the rmarkdown documents from running a shiny-server on a linux machine. I found it odd that when I ran it in rstudio on the same linux machine it worked fine, but not when I ran it using shiny-server. So the shiny-server install of pandoc is old/outdated. Cheers

    0 讨论(0)
提交回复
热议问题