Rstudio / pandoc 问题 - 无法编织成 HTML 或 PDF
Rstudio / pandoc issue - can't knit to HTML or PDF
我不能再编织成 HTML 或 PDF,尽管它以前工作得很好。这是我不断收到的错误:
pandoc: out of memory (requested 1048576 bytes)
Error in strsplit(version_info, "\n")[[1]] : subscript out of bounds
Calls: <Anonymous> ... pandoc_available -> find_pandoc -> lapply -> FUN -> get_pandoc_version
In addition: Warning message:
running command ''/usr/lib/rstudio/bin/pandoc/pandoc' --version' had status 1
Execution halted
我以前有Rstudio 0.999.903,我卸载了,然后安装了1.0.44版本,通过Rstudio重新安装了knitr包,但我又遇到这个错误。
我使用 debian 软件包安装程序从 git 存储库安装了 pandoc 1.18-1,同样的问题再次出现。
后来我将 Rstudio 更新到 1.0.136 版,将 pandoc 更新到 1.19.2.1 版,没有变化。
我尝试卸载 R 并重新安装更新的版本,但仍然没有成功。
命令行有效:
library(rmarkdown)
rmarkdown::render("test.Rmd", "html_document")
--
我正在使用 Debian (LMDE2)。
终于明白了!
Arch 用户似乎在 2 年前描述了这个错误 here。
似乎这个错误是在 Debian 系统中使用 Rstudio 版本 0.98+ 为我引入的(我使用 LMDE Betsy)。
与 Rstudio 一起安装的 pandoc 版本不起作用,当我手动安装 pandoc 时,Rstudio 会坚持使用它自己的损坏版本。无论如何,解决方法是从 Rstudio 发行版中删除可执行文件 pandoc,然后符号链接另一个版本的 pandoc:
apt-get install pandoc
rm /usr/lib/rstudio/bin/pandoc/pandoc
ln -s /usr/bin/pandoc /usr/lib/rstudio/bin/pandoc/pandoc
rm /usr/lib/rstudio/bin/pandoc/pandoc-citeproc
ln -s /usr/bin/pandoc-citeproc /usr/lib/rstudio/bin/pandoc/pandoc-citeproc
我找到了这个解决方法 here。
存储库有 pandoc 1.12 版,但更新的版本也可以。我现在使用的是 pandoc 1.19.2.1 和 Rstudio 1.0.136.
我不能再编织成 HTML 或 PDF,尽管它以前工作得很好。这是我不断收到的错误:
pandoc: out of memory (requested 1048576 bytes)
Error in strsplit(version_info, "\n")[[1]] : subscript out of bounds
Calls: <Anonymous> ... pandoc_available -> find_pandoc -> lapply -> FUN -> get_pandoc_version
In addition: Warning message:
running command ''/usr/lib/rstudio/bin/pandoc/pandoc' --version' had status 1
Execution halted
我以前有Rstudio 0.999.903,我卸载了,然后安装了1.0.44版本,通过Rstudio重新安装了knitr包,但我又遇到这个错误。
我使用 debian 软件包安装程序从 git 存储库安装了 pandoc 1.18-1,同样的问题再次出现。
后来我将 Rstudio 更新到 1.0.136 版,将 pandoc 更新到 1.19.2.1 版,没有变化。
我尝试卸载 R 并重新安装更新的版本,但仍然没有成功。
命令行有效:
library(rmarkdown)
rmarkdown::render("test.Rmd", "html_document")
--
我正在使用 Debian (LMDE2)。
终于明白了!
Arch 用户似乎在 2 年前描述了这个错误 here。
似乎这个错误是在 Debian 系统中使用 Rstudio 版本 0.98+ 为我引入的(我使用 LMDE Betsy)。
与 Rstudio 一起安装的 pandoc 版本不起作用,当我手动安装 pandoc 时,Rstudio 会坚持使用它自己的损坏版本。无论如何,解决方法是从 Rstudio 发行版中删除可执行文件 pandoc,然后符号链接另一个版本的 pandoc:
apt-get install pandoc
rm /usr/lib/rstudio/bin/pandoc/pandoc
ln -s /usr/bin/pandoc /usr/lib/rstudio/bin/pandoc/pandoc
rm /usr/lib/rstudio/bin/pandoc/pandoc-citeproc
ln -s /usr/bin/pandoc-citeproc /usr/lib/rstudio/bin/pandoc/pandoc-citeproc
我找到了这个解决方法 here。
存储库有 pandoc 1.12 版,但更新的版本也可以。我现在使用的是 pandoc 1.19.2.1 和 Rstudio 1.0.136.