首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Rmarkdown在Win 10机器上不起作用: openBinaryFile:不存在(没有这样的文件或目录)

Rmarkdown在Win 10机器上不起作用: openBinaryFile:不存在(没有这样的文件或目录)
EN

Stack Overflow用户
提问于 2019-09-25 04:37:30
回答 2查看 4K关注 0票数 6

我不能编织html,pdf或word。每次都出现相同的错误:

代码语言:javascript
运行
复制
"C:/Users/bosr/AppData/Local/Pandoc/pandoc" +RTS -K512m -RTS test.utf8.md --to docx --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash+smart --output test.docx --highlight-style tango 
pandoc.exe: test.utf8.md: openBinaryFile: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 1
Execution halted

我知道有很多这样的问题,但我发现没有一个能解决我的问题。

我在一台没有管理员权限的新Win10机器上安装了R 3.6.1和RStudio 1.2.1578。除了Rmarkdown之外,我设法让所有的东西都正常工作。下面是我的sessionInfo()。如果我打开命令提示符,可以找到pandoc:

代码语言:javascript
运行
复制
C:\>pandoc --version
pandoc 2.7.3
Compiled with pandoc-types 1.17.5.4, texmath 0.11.2.2, skylighting 0.8.1
Default user data directory: C:\Users\bosr\AppData\Roaming\pandoc
Copyright (C) 2006-2019 John MacFarlane
Web:  http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.

我在C:\Users\bosr\AppData\Local\ pandoc \安装了Pandoc

我还尝试了@kevinushey提到的解决方案here,这导致在H:\r rstudio pandoc \上安装了第二个pandoc

两个pandoc安装都在我的path (用户)环境变量中,我可以设置这个环境变量。

如果有任何建议,我将不胜感激。

代码语言:javascript
运行
复制
- Session info -------------------------------------------------------
 setting  value                       
 version  R version 3.6.1 (2019-07-05)
 os       Windows 10 x64              
 system   x86_64, mingw32             
 ui       RStudio                     
 language (EN)                        
 collate  English_United States.1252  
 ctype    English_United States.1252  
 tz       America/New_York            
 date     2019-09-24                  

- Packages -----------------------------------------------------------
 package   * version date       lib source                      
 base64enc   0.1-3   2015-07-28 [1] CRAN (R 3.6.1)              
 digest      0.6.21  2019-09-20 [1] CRAN (R 3.6.1)              
 evaluate    0.14    2019-05-28 [1] CRAN (R 3.6.1)              
 glue        1.3.1   2019-03-12 [1] CRAN (R 3.6.1)              
 highr       0.8     2019-03-20 [1] CRAN (R 3.6.1)              
 htmltools   0.3.6   2017-04-28 [1] CRAN (R 3.6.1)              
 jsonlite    1.6     2018-12-07 [1] CRAN (R 3.6.1)              
 knitr       1.25.1  2019-09-24 [1] Github (yihui/knitr@11ddfc6)
 magrittr    1.5     2014-11-22 [1] CRAN (R 3.6.1)              
 markdown    1.1     2019-08-07 [1] CRAN (R 3.6.1)              
 mime        0.7     2019-06-11 [1] CRAN (R 3.6.0)              
 Rcpp        1.0.2   2019-07-25 [1] CRAN (R 3.6.1)              
 rmarkdown   1.15    2019-08-21 [1] CRAN (R 3.6.1)              
 stringi     1.4.3   2019-03-12 [1] CRAN (R 3.6.0)              
 stringr     1.4.0   2019-02-10 [1] CRAN (R 3.6.1)              
 tinytex     0.16    2019-09-17 [1] CRAN (R 3.6.1)              
 xfun        0.9     2019-08-21 [1] CRAN (R 3.6.1)              
 yaml        2.2.0   2018-07-25 [1] CRAN (R 3.6.0)              

[1] C:/Users/bosr/R/R-3.6.1/library
[2] C:/pit

更新:我让IT部门使用管理员密码安装pandoc,但仍然收到相同的错误:

代码语言:javascript
运行
复制
"C:/PROGRA~1/Pandoc/pandoc" +RTS -K512m -RTS riskNotes.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output riskReport_20190925.tex --table-of-contents --toc-depth 2 --template "C:\Users\bosr\R\R-3.6.1\library\rmarkdown\rmd\latex\default-1.17.0.2.tex" --no-highlight --pdf-engine pdflatex --variable graphics=yes --variable "compact-title:yes" 
pandoc.exe: riskNotes.utf8.md: openBinaryFile: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 1
In addition: There were 22 warnings (use warnings() to see them)
EN

Stack Overflow用户

发布于 2019-09-26 00:18:43

好的,现在我明白了,这是因为文件保存在网络驱动器上。参见here。目前还没有解决的办法。太可惜了。

票数 2
EN
查看全部 2 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/58087795

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档