Cannot Knit to PDF

Whenever i try to knit to PDF i get the error message below. I used to be able to Knit to PDF okay this is just suddenly started. I am getting the below error message:

! Sorry, but C:\Users\naa56\AppData\Local\Programs\MIKTEX~1.9\miktex\bin\x64\pdflatex.exe did not succeed.

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

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

Error: Failed to compile test.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips. See test.log for more info.
Execution halted

Can you share the contents of

C:\Users\naa56\AppData\Local\MiKTeX\2.9\miktex\log\pdflatex.log 

?

2020-02-05 18:23:03,622Z INFO  pdflatex - starting with command line: C:\Users\naa56\AppData\Local\Programs\MIKTEX~1.9\miktex\bin\x64\pdflatex.exe -halt-on-error -interaction=batchmode Assignment-1-Getting-to-know-JAGS.tex
2020-02-05 18:23:03,643Z INFO  pdflatex - allowing known shell commands
2020-02-05 18:23:03,644Z INFO  pdflatex - enabling input (output) from (to) processes
2020-02-05 18:23:03,676Z INFO  pdflatex - going to create file: pdflatex.fmt
2020-02-05 18:23:48,177Z FATAL pdflatex - GUI framework cannot be initialized.
2020-02-05 18:23:48,177Z FATAL pdflatex - Info: 
2020-02-05 18:23:48,177Z FATAL pdflatex - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2020-02-05 18:23:48,177Z FATAL pdflatex - Line: 77
2020-02-05 18:23:48,177Z INFO  pdflatex - finishing with exit code 1
2020-02-05 18:24:40,497Z INFO  pdflatex - starting with command line: C:\Users\naa56\AppData\Local\Programs\MIKTEX~1.9\miktex\bin\x64\pdflatex.exe -halt-on-error -interaction=batchmode Assignment-1-Getting-to-know-JAGS.tex
2020-02-05 18:24:40,504Z INFO  pdflatex - allowing known shell commands
2020-02-05 18:24:40,504Z INFO  pdflatex - enabling input (output) from (to) processes
2020-02-05 18:24:40,680Z FATAL pdflatex - GUI framework cannot be initialized.
2020-02-05 18:24:40,680Z FATAL pdflatex - Info: 
2020-02-05 18:24:40,680Z FATAL pdflatex - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2020-02-05 18:24:40,680Z FATAL pdflatex - Line: 77
2020-02-05 18:24:40,680Z INFO  pdflatex - finishing with exit code 1
2020-02-05 18:26:47,052Z INFO  pdflatex - starting with command line: C:\Users\naa56\AppData\Local\Programs\MIKTEX~1.9\miktex\bin\x64\pdflatex.exe -halt-on-error -interaction=batchmode Assignment-1-Getting-to-know-JAGS.tex
2020-02-05 18:26:47,058Z INFO  pdflatex - allowing known shell commands
2020-02-05 18:26:47,059Z INFO  pdflatex - enabling input (output) from (to) processes
2020-02-05 18:26:47,236Z FATAL pdflatex - GUI framework cannot be initialized.
2020-02-05 18:26:47,236Z FATAL pdflatex - Info: 
2020-02-05 18:26:47,236Z FATAL pdflatex - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2020-02-05 18:26:47,236Z FATAL pdflatex - Line: 77
2020-02-05 18:26:47,237Z INFO  pdflatex - finishing with exit code 1
2020-02-05 18:27:49,651Z INFO  pdflatex - starting with command line: C:\Users\naa56\AppData\Local\Programs\MIKTEX~1.9\miktex\bin\x64\pdflatex.exe -halt-on-error -interaction=batchmode test.tex
2020-02-05 18:27:49,657Z INFO  pdflatex - allowing known shell commands
2020-02-05 18:27:49,658Z INFO  pdflatex - enabling input (output) from (to) processes
2020-02-05 18:27:49,836Z FATAL pdflatex - GUI framework cannot be initialized.
2020-02-05 18:27:49,836Z FATAL pdflatex - Info: 
2020-02-05 18:27:49,836Z FATAL pdflatex - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2020-02-05 18:27:49,836Z FATAL pdflatex - Line: 77
2020-02-05 18:27:49,836Z INFO  pdflatex - finishing with exit code 1
2020-02-05 18:33:43,565Z INFO  pdflatex - starting with command line: C:\Users\naa56\AppData\Local\Programs\MIKTEX~1.9\miktex\bin\x64\pdflatex.exe -halt-on-error -interaction=batchmode Assignment-1-Getting-to-know-JAGS.tex
2020-02-05 18:33:43,571Z INFO  pdflatex - allowing known shell commands
2020-02-05 18:33:43,571Z INFO  pdflatex - enabling input (output) from (to) processes
2020-02-05 18:33:43,611Z INFO  pdflatex - going to create file: pdflatex.fmt
2020-02-05 18:33:47,528Z FATAL pdflatex - GUI framework cannot be initialized.
2020-02-05 18:33:47,528Z FATAL pdflatex - Info: 
2020-02-05 18:33:47,528Z FATAL pdflatex - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2020-02-05 18:33:47,528Z FATAL pdflatex - Line: 77
2020-02-05 18:33:47,529Z INFO  pdflatex - finishing with exit code 1
2020-02-05 18:34:18,470Z INFO  pdflatex - starting with command line: C:\Users\naa56\AppData\Local\Programs\MIKTEX~1.9\miktex\bin\x64\pdflatex.exe -halt-on-error -interaction=batchmode test.tex
2020-02-05 18:34:18,475Z INFO  pdflatex - allowing known shell commands
2020-02-05 18:34:18,476Z INFO  pdflatex - enabling input (output) from (to) processes
2020-02-05 18:34:18,641Z FATAL pdflatex - GUI framework cannot be initialized.
2020-02-05 18:34:18,641Z FATAL pdflatex - Info: 
2020-02-05 18:34:18,641Z FATAL pdflatex - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2020-02-05 18:34:18,641Z FATAL pdflatex - Line: 77
2020-02-05 18:34:18,641Z INFO  pdflatex - finishing with exit code 1
2020-02-05 18:35:17,180Z INFO  pdflatex - starting with command line: C:\Users\naa56\AppData\Local\Programs\MIKTEX~1.9\miktex\bin\x64\pdflatex.exe -halt-on-error -interaction=batchmode test.tex
2020-02-05 18:35:17,186Z INFO  pdflatex - allowing known shell commands
2020-02-05 18:35:17,187Z INFO  pdflatex - enabling input (output) from (to) processes
2020-02-05 18:35:17,357Z FATAL pdflatex - GUI framework cannot be initialized.
2020-02-05 18:35:17,357Z FATAL pdflatex - Info: 
2020-02-05 18:35:17,357Z FATAL pdflatex - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2020-02-05 18:35:17,357Z FATAL pdflatex - Line: 77
2020-02-05 18:35:17,358Z INFO  pdflatex - finishing with exit code 1
2020-02-05 18:37:14,508Z INFO  pdflatex - starting with command line: C:\Users\naa56\AppData\Local\Programs\MIKTEX~1.9\miktex\bin\x64\pdflatex.exe -halt-on-error -interaction=batchmode test.tex
2020-02-05 18:37:14,553Z INFO  pdflatex - allowing known shell commands
2020-02-05 18:37:14,554Z INFO  pdflatex - enabling input (output) from (to) processes
2020-02-05 18:37:16,065Z FATAL pdflatex - GUI framework cannot be initialized.
2020-02-05 18:37:16,065Z FATAL pdflatex - Info: 
2020-02-05 18:37:16,065Z FATAL pdflatex - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2020-02-05 18:37:16,065Z FATAL pdflatex - Line: 77
2020-02-05 18:37:16,065Z INFO  pdflatex - finishing with exit code 1

When I read that it seems to me to be a problem with Miktex
I see that there is a community here that might advise you
https://miktex.org/

I haven't used Miktex, rather I use TinyTex, it might be an option for you.

Thanks for your help! Installing TinyTex works

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