r-system-requirements icon indicating copy to clipboard operation
r-system-requirements copied to clipboard

missing dependencies for rmarkdown on CentOS 7

Open cobrin opened this issue 5 years ago • 1 comments

Product: RStudio Server Pro Version 1.3.959-1 Operating System: CentOS 7.8

Description When trying to run the attached code, I see an error from invoking rmarkdown:render(), unfortunately Package Manager does not list pdflatex as a dependency which must be installed it only mentions

yum install -y libicu-devel
yum install -y epel-release
yum install -y pandoc

Package Manager version 1.2.4.1-5

R version 4.0.2 (2020-06-22) -- "Taking Off Again"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (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.
 
[Workspace loaded from ~/.RData]
> library(rmarkdown)
> tempReport <- file.path("example.Rmd")
> rmarkdown::render(tempReport)
 
 
processing file: example.Rmd
  |.....                                                                                                                                          |   3%
  ordinary text without R code
 
  |..........                                                                                                                                     |   7%
label: unnamed-chunk-1 (with options)
List of 3
$ fig.width : num 1
$ fig.height: num 10
$ echo      : logi FALSE
 
  |...............                                                                                                                                |  10%
  ordinary text without R code
 
  |....................                                                                                                                           |  14%
label: studyid (with options)
List of 3
$ results  : chr "asis"
$ echo     : logi FALSE
$ fig.align: chr "right"
 
  |.........................                                                                                                                      |  17%
  ordinary text without R code
 
  |..............................                                                                                                                 |  21%
label: supplement (with options)
List of 3
$ results  : chr "asis"
$ echo     : logi FALSE
$ fig.align: chr "right"
 
  |...................................                                                                                                            |  24%
  ordinary text without R code
 
  |.......................................                                                                                                        |  28%
label: txt1 (with options)
List of 2
$ results: chr "asis"
$ echo   : logi FALSE
 
  |............................................                                                                                                   |  31%
  ordinary text without R code
 
  |.................................................                                                                                              |  34%
label: txt2 (with options)
List of 2
$ results: chr "asis"
$ echo   : logi FALSE
 
  |......................................................                                                                                         |  38%
  ordinary text without R code
 
  |...........................................................                                                                                    |  41%
label: txt3 (with options)
List of 2
$ results: chr "asis"
$ echo   : logi FALSE
 
  |................................................................                                                                               |  45%
  ordinary text without R code
 
  |.....................................................................                                                                          |  48%
label: txt4 (with options)
List of 2
$ results: chr "asis"
$ echo   : logi FALSE
 
  |..........................................................................                                                                     |  52%
  ordinary text without R code
 
  |...............................................................................                                                                |  55%
label: txt5 (with options)
List of 2
$ results: chr "asis"
$ echo   : logi FALSE
 
  |....................................................................................                                                           |  59%
  ordinary text without R code
 
  |.........................................................................................                                                      |  62%
label: timecomparison (with options)
List of 2
$ results: chr "asis"
$ echo   : logi FALSE
 
  |..............................................................................................                                                 |  66%
  ordinary text without R code
 
  |...................................................................................................                                            |  69%
label: txt6 (with options)
List of 2
$ results: chr "asis"
$ echo   : logi FALSE
 
  |........................................................................................................                                       |  72%
  ordinary text without R code
 
  |............................................................................................................                                   |  76%
label: txt8 (with options)
List of 2
$ results: chr "asis"
$ echo   : logi FALSE
 
  |.................................................................................................................                              |  79%
  ordinary text without R code
 
  |......................................................................................................................                         |  83%
label: txt9 (with options)
List of 2
$ results: chr "asis"
$ echo   : logi FALSE
 
  |...........................................................................................................................                    |  86%
  ordinary text without R code
 
  |................................................................................................................................               |  90%
label: txt10 (with options)
List of 3
$ results: chr "asis"
$ echo   : logi FALSE
$ indent : chr "  "
 
  |.....................................................................................................................................          |  93%
  ordinary text without R code
 
  |..........................................................................................................................................     |  97%
label: commenttable (with options)
List of 2
$ echo   : logi FALSE
$ results: chr "asis"
 
  |...............................................................................................................................................| 100%
   inline R code fragments
 
 
output file: example.knit.md
 
/mnt/apps/rstudio-server/usr/lib/bin/pandoc/pandoc +RTS -K512m -RTS example.utf8.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output example.tex --self-contained --highlight-style tango --pdf-enginepdflatex --variable graphics --lua-filter /home/scobrin/R/x86_64-pc-linux-gnu-library/4.0/rmarkdown/rmd/lua/pagebreak.lua --lua-filter /home/scobrin/R/x86_64-pc-linux-gnu-library/4.0/rmarkdown/rmd/lua/latex-div.lua --variable 'geometry:margin=1in' 
! sh: pdflatex: command not found
 
Error: LaTeX failed to compile example.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See example.log for more info.
In addition: Warning message:
In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) :
  error in running command

cobrin avatar Aug 05 '20 21:08 cobrin

Install TinyTex

bkmgit avatar Oct 17 '22 07:10 bkmgit