无法使用#bookdown软件包生成“ A Chapman&Hall / CRC Book”示例的pdf输出

时间:2019-05-11 23:53:36

标签: r r-markdown bookdown

在尝试使用Bookdown为Chapman&Hall / CRC变体呈现pdf_book时,我面临挑战

我严格按照Yihui在其仓库https://github.com/yihui/bookdown-crc中的指南进行操作,克隆了仓库,并能够从我的Rstudio IDE渲染/构建gitbook输出。但是,当我尝试呈现pdf_book输出时,出现以下错误提示。仅供参考-我已经安装了TinyTex和其他依赖项,包括Pandoc。

Quitting from lines 22-30 (bookdown.Rmd) 
Error in dev.control(displaylist = if (record) "enable" else
"inhibit") : dev.control() called without an open graphics device
In addition: Warning messages:
1: In (function (filename = if (onefile) "Rplots.pdf" else  
"Rplot%03d.pdf",  :
unable to load shared object   
'/Library/Frameworks/R.framework/Resources/library/grDevices/libs//
cairo.so':
dlopen(/Library/Frameworks/R.framework/Resources/library/grDevices/
libs//cairo.so, 6): Library not loaded: /opt/X11/lib/libxcb-shm.0.dylib
Referenced from:

/Library/Frameworks/R.framework/Resources/library/grDevices/libs//
cairo.so
Reason: image not found
2: In (function (filename = if (onefile) "Rplots.pdf" else  

"Rplot%03d.pdf",  :
failed to load cairo DLL

0 个答案:

没有答案