1
votes

I have been working on developing a shiny dashboard that had a button to download a PDF. I have been working locally on my Windows 7 machine, using the following:

  • R 3.3.1
  • RStudio 0.99.902

I have developed the dashboard just fine, the *.Rmd file works as well, although it took a bit to figure out some formatting things. Other than some formatting things with a header.tex file, everything is standard. I'm not using any special packages or anything like that.

In the end, this dashboard should run on a Redhat 6.8 box that I have setup for the end-users. On this box I have the following installed:

  • R 3.3.1 (this installs with some standard texlive dependencies)
  • Pandoc 1.9.4.1-1.1.el6

I have made sure that all packages required have been installed in the R installation (rmarkdown, knitr, shiny, etc..).

My problem occurs when attempt to knit/render the *.Rmd file:

> rmarkdown::render("pdfReport.Rmd")
  Error: pandoc version 1.12.3 or higher is required and was not found (see the help page ?rmarkdown::pandoc_available).

So, after much searching, I found that RedHat repos (and other distributions) tend to carry much older versions of pandoc, whereas the Windows install of RStudio I have came with a pandoc.exe compatible with the items I needed.

My next course of action was to just manually install pandoc. I found the following:

http://pandoc.org/installing.html

It steps you through downloading and installing by way of stack. So I installed Haskell-platform and the Haskell toolset to get "stack". I then attempted to compile a few different versions of pandoc with the procedure, not having any success and a ton of compilation errors.

With all of that said, is a possibility of one of the following:

  1. Install a current version (1.12 or newer) of pandoc on RedHat 6.8 easily? Maybe there is is an RPM somewhere??
  2. Make the installation parameters I currently have on my install (RHEL 6.8, R 3.3.1 and pandoc 1.9.4.1) work together? Maybe some sort of override.

Thanks in advance!

1
Lending a hand since google apparently was broken [RedHat 6.8 pandoc 1.12 search terms] and this is prbly going to get closed as being off-topic for here (perhaps not on server fault) rpmfind.net/linux/rpm2html/search.php?query=pandochrbrmstr
@hrbrmstr - Shoot, I should have mentioned this - I did grab that RPM and try it, but there are several dependencies that the install cannot find. I resolved many of them, but several were unable to resolve or wrong version provided by the repos. I'd have to go find all of those specific versions and download them as well. Is there an easier way to do this that I am not aware of?azdatasci

1 Answers

2
votes

Pandoc 1.17 is currently in the Fedora repo which should be compatible with RedHat, right?

But 1.17 is already quite old again. So compiling from source may be your best option and using stack it's rather straight-forward:

git clone https://github.com/jgm/pandoc
cd pandoc
git submodule update --init   # to fetch the templates
stack setup                   # to fetch ghc
stack install