R Markdown doesn't create pdf file ("Latex failed to compile ...")

Hi all,

I am a beginner at R. I am trying to knit R Markdown to PDF and it doesn't work.
I already installed the package "rmarkdown" which also included the package "tinytex".
I receive the following error code:

output file: My_first_r_markdown.knit.md

! Sorry, but C:\Users\Wagp62\AppData\Local\Programs\MiKTeX\miktex\bin\x64\pdflatex.exe did not succeed.

! The log file hopefully contains the information to get MiKTeX going again:

!   C:\Users\Wagp62\AppData\Local\MiKTeX\miktex\log\pdflatex.log

! pdflatex: major issue: So far, you have not checked for MiKTeX updates.

Error: LaTeX failed to compile My_first_r_markdown.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See My_first_r_markdown.log for more info.
Execution halted

Can somebody help me with this? Thanks a lot.

Best regards

This is an external dependency—the LaTeX libraries. I'm sorry I can't offer any suggestions related to updating MiKTeX under Win, but you might try

install.packages("tinytex")
1 Like

It seems MikTeX is asking you to update. Did you already look into that ?

You can also use another distribution like TinyTeX, which is tested specifically with rmarkdown

You can install it and manage it easily using the tinytex R :package:

See

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.