0

devtools::build_manual() 产生Error: Failed to build manual(至少在 Windows 上)。

重现步骤:

  1. 在 R Studio 上创建一个新的 R 项目。
  2. 为 hello_world 函数添加此文档,记录并构建包。
#' Hello world doc
#'
#' @export
#'
hello <- function() {
  print("Hello, world!")
}
  1. 尝试运行devtools::build_manual()

错误:构建手册失败

这似乎是最近的问题;我可以在不久前构建我的包手册。我在这个问题中尝试了check_manual() 函数,这就是我得到的:

> check_man()
Checking:  hello.RdError: Failed to build manual
Called from: value[[3L]](cond)
Browse[1]> e
System command 'Rcmd.exe' failed, exit status: 1, stdout + stderr (last 10 lines):
E> ima/AppData/Roaming/TinyTeX/texmf-dist/fonts/type1/urw/times/utmb8a.pfb><c:/Use
E> rs/plima/AppData/Roaming/TinyTeX/texmf-dist/fonts/type1/urw/times/utmr8a.pfb><c
E> :/Users/plima/AppData/Roaming/TinyTeX/texmf-dist/fonts/type1/urw/times/utmri8a.
E> pfb>
E> Output written on Rd2.pdf (1 page, 50650 bytes).
E> Transcript written on Rd2.log.
E> Warning in sys2(makeindex, shQuote(idxfile)) : '"makeindex"' not found
E> Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet,  : 
E>   unable to run 'makeindex' on 'Rd2.idx'
E> Error in running tools::texi2pdf()

我不知道如何处理这个输出。我只知道不久前我可以制作手册。

> sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] manualtest_0.1.0

loaded via a namespace (and not attached):
 [1] magrittr_2.0.1    usethis_2.0.1     devtools_2.4.2    pkgload_1.2.1     R6_2.5.0          rlang_0.4.11     
 [7] fastmap_1.1.0     fansi_0.5.0       tools_4.1.0       pkgbuild_1.2.0    sessioninfo_1.1.1 utf8_1.2.2       
[13] cli_3.0.1         withr_2.4.2       ellipsis_0.3.2    remotes_2.4.0     rprojroot_2.0.2   tibble_3.1.3     
[19] lifecycle_1.0.0   crayon_1.4.1      processx_3.5.2    purrr_0.3.4       callr_3.7.0       vctrs_0.3.8      
[25] fs_1.5.0          ps_1.6.0          testthat_3.0.4    memoise_2.0.0     glue_1.4.2        cachem_1.0.5     
[31] pillar_1.6.1      compiler_4.1.0    desc_1.3.0        prettyunits_1.1.1 pkgconfig_2.0.3  
4

1 回答 1

0

运行tinytex::tlmgr_install("makeindex")解决了这个问题,无需重新安装tinytex。

于 2021-11-15T02:13:01.140 回答