Skip to content

[R-pkg-devel] Warning in system2(..., stdout = FALSE, stderr = FALSE) :, '"pdflatex"' not found

4 messages · Tomas Kalibera, Spencer Graves

#
Hello, All:


 ????? What's the recommended way to get pdflatex installed on Windows 
10 to run "R CMD"?


 ????? I ask, because "R CMD build bssm" under Windows 10 produced 
'Warning in system2(..., stdout = FALSE, stderr = FALSE) : '"pdflatex"' 
not found'.


 ????? This was after installing Rtools using the following (recommended 
by 
"https://thecoatlessprofessor.com/programming/cpp/installing-rtools-for-compiled-code-via-rcpp/"): 



install.packages("installr")
library("installr")
install.Rtools()


 ????? Below please find the output in a commands window including 
"sessionInfo()".


 ??? ? Thanks,
 ??? ? Spencer Graves


 >R CMD build bssm
* checking for file 'bssm/DESCRIPTION' ... OK
* preparing 'bssm':
* checking DESCRIPTION meta-information ... OK
* cleaning src
* installing the package to build vignettes
* creating vignettes ... ERROR
--- re-building 'bssm.Rmd' using rmarkdown
[WARNING] Note with key '1' defined at line 318 column 1 but not used.
Warning in system2(..., stdout = FALSE, stderr = FALSE) :
 ? '"pdflatex"' not found
Error: processing vignette 'bssm.Rmd' failed with diagnostics:
Failed to compile bssm.tex. See https://yihui.name/tinytex/r/#debugging 
for debugging tips.
--- failed re-building 'bssm.Rmd'

--- re-building 'growth_model.Rmd' using rmarkdown
Warning in system2(..., stdout = FALSE, stderr = FALSE) :
 ? '"pdflatex"' not found
Error: processing vignette 'growth_model.Rmd' failed with diagnostics:
Failed to compile growth_model.tex. See 
https://yihui.name/tinytex/r/#debugging for debugging tips.
--- failed re-building 'growth_model.Rmd'

SUMMARY: processing the following files failed:
 ? 'bssm.Rmd' 'growth_model.Rmd'

Error: Vignette re-building failed.
Execution halted

C:\Users\spenc\Documents\R\bssm\bssm>
C:\Users\spenc\Documents\R\bssm\bssm>pdflatex
'pdflatex' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\spenc\Documents\R\bssm\bssm>r

R version 3.6.1 (2019-07-05) -- "Action of the Toes"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

 ? Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

 > sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)

Matrix products: default

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

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

loaded via a namespace (and not attached):
[1] compiler_3.6.1
#
Update:? A web search for 'installing pdflatex for "R CMD" on Windows 
10?' suggested I install MiKTeX.? I did that from miktex.org, and it got 
me past that error.? Spencer
On 2019-09-19 01:50, Spencer Graves wrote:
#
On 9/19/19 6:29 AM, Spencer Graves wrote:
Please note these things are documented in R Installation and 
Administration Manual (see Appendix D)

Best
Tomas
#
On 2019-09-19 12:19, Tomas Kalibera wrote:
????? Thanks for documenting this.? It's important to have that as part 
of this thread.


 ????? I perhaps should have thought to look there, but I didn't. And 
the web searches I tried didn't lead me there. ? Spencer