Trouble with Pandoc installation on Ubuntu 14.04LTS for using with R Markdown
这个问题是我尝试通过
在不了解RStudio在哪里维护
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | [ 6 of 57] Compiling Text.Pandoc.Readers.TeXMath ( src/Text/Pandoc/Readers/TeXMath.hs, dist/build/Text/Pandoc/Readers/TeXMath.o ) src/Text/Pandoc/Readers/TeXMath.hs:30:38: Ambiguous occurrence `readTeXMath' It could refer to either `Text.Pandoc.Readers.TeXMath.readTeXMath', defined at src/Text/Pandoc/Readers/TeXMath.hs:56:1 or `Text.TeXMath.readTeXMath', imported from `Text.TeXMath' at src/Text/Pandoc/Readers/TeXMath.hs:33:1-19 (and originally defined in `Text.TeXMath.Parser') Failed to install pandoc-1.12.4.2 cabal: Error: some packages failed to install: pandoc-1.12.4.2 failed during the building phase. The exception was: ExitFailure 1 pandoc-citeproc-0.3.1 depends on pandoc-1.12.4.2 which failed to install. |
首先,我不确定如何修复它。其次,我非常怀疑应该有比这更简单的方法来享受使用
更新(请参阅评论):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Rscript -e 'library(rmarkdown); render("knitr-example-slides-1.Rmd")' processing file: knitr-example-slides-1.Rmd |....... | 11% ordinary text without R code |.............. | 22% label: setup (with options) List of 1 $ include: logi FALSE Quitting from lines 6-8 (knitr-example-slides-1.Rmd) Error in eval(expr, envir, enclos) : object 'opts_chunk' not found Calls: render ... handle -> withCallingHandlers -> withVisible -> eval -> eval Execution halted |
基本上,@ daroczig在上面的评论中回答了这个问题,因此我将在此处重复,再加上将在主要问题的问题修复之后出现的有关该问题的次要问题的答案。
1)" RStudio已随附Pandoc的二进制编译版本,因此您只需创建一个符号链接,即可在RStudio生态系统之外轻松使用该符号链接:https://github.com/rstudio /rmarkdown/blob/master/PANDOC.md#newer-systems-debianubuntufedora";
2)我已解决上述错误,在应用上述建议后(请参阅我的评论),通过使用明确的包引用: