system environment
- ubuntu 16 </ li>
- R 3.4.4 </ li>
- rstudio server – 1.1.463 </ li>
- rmarkdown 1.6 </ li>
- knitr 1.21 </ li> </ ul>
error message
Error: pandoc document conversion failed with error 43
error scenario
is like this error on stackoverflow. An RMD file written in RStudio – Server with Chinese characters can normally generate the corresponding PDF file, but an error will be reported if the command to generate the PDF file is executed from the command line with the following code.
R -q -e 'rmarkdown::render("myreport.rmd", output_format = "pdf_document")
observed the pandoc command printed by the system when generating PDF in rstudio-server is as follows:
/usr/lib/rstudio-server/bin/pandoc/pandoc +RTS -K512m -RTS myreport.utf8.md --to latex .....
pandoc command printed when PDF is generated on the command line is as follows:
/usr/bin/pandoc +RTS -K512m -RTS myreport.utf8.md --to latex...
it can be seen that the pandoc used in the two environments is different, and the version information (pandoc-v) of the two pandoc queries is 1.19 and 1.16 respectively. Therefore, it should be a problem with the PanDoc version.
error exclusion
USES the following command to update pandoc in the system. It is found that the pandoc corresponding to the latest version of the system can only be 1.16.
sudo apt-get install --upgrade pandoc
simply replaces pandoc in rstudio-server with pandoc in the system.
cd /usr/bin sudo mv pandoc pandoc.bak # 备份系统中pandoc的执行文件 sudo ln -s /usr/lib/rstudio-server/bin/pandoc/pandoc pandoc # 建立软连接,将rstudio-server中的pandoc执行文件链接过来
now that the pandoc command on the system has been replaced with the one in rstudio-server, you can generate PDF reports in the command line environment.
Read More:
- “Pandoc document conversion failed with error 1033” error message appears in rstudio knit
- How to Fix nbconvert failed: Pandoc wasn’t found. Please check that pandoc is installed:
- How to Fix Pandoc wasn’t found.pdflatex not found on PATH
- JS error: permission denied to access property ‘document’— document.domain -The same source strategy of JavaScript
- Word failed to convert PDF, export failed due to an unexpected error
- The Spring problem Failed to read Schema Document
- Conversion to dalvik format failed with error 1 solution
- Error in compiling rmarkdown to PDF file` xxx.sty ‘ not found.
- Problem solving: PDF cannot be opened, and acrobat failed to connect to a DDE server appears
- Visual Studio 2010 compilation error fatal error lnk1123: failed during conversion to coff: solution to invalid or corrupt file
- Error: failed to find conversion function from unknown to text
- VS2008 comes with crystal reports: Failed to Save Document
- How to generate PDF by C #
- Error converting jupyter notebook to PDF
- In vs2013, reshharper and team management plug-in git share a temporary solution to the “failed modify to document” error.
- Edit the file to be edited by GEDIT. After saving, the warning set document metadata failed: setting attribute metadata:: GEDIT position no appears
- DOMException: play() failed because the user didn‘t interact with the document first
- Edit the file to be edited by gedit. After saving, a warning of Set document metadata failed: Setting attribute metadata::gedit-position no appears
- There was an internal error, and Internet Explorer is unable to print this document
- The solution of PDF file unable to display thumbnail in win7