I updated my packages in MikTeX Console this morning and appear to have somehow broken my LaTeX distribution. Everything worked fine a few days ago, and now it does not. Normally I'd try reinstalling MikTeX, but in a reply to this question, Ulrike Fischer said to spend less time uninstalling and reinstalling and more time trying to solve the problem, so I'm asking for help here.
My problem boils down to: whenever I try and compile a document using LaTeX, either by LaTeX or PDFLaTeX, in either the command prompt or TeXMaker, it fails. I am running a user-mode-only install of MikTeX on Windows 10 Pro (Version 2004). I usually use TeXMaker as my editor (Version 5.0.3), and my MikTeX Console is version 4.0.1. I have tried the following:
- Compiling in the command line as mentioned above and suggested in many similar questions
- Deleting the
.fndb
files inC:\Users\amize\AppData\Local\MiKTeX\2.9\miktex\data\le
, as suggested in Error in Updating FNDB after last update - Installing all packages that begin with 'miktex', updating packages, and restarting, as suggested in MiKTeX won't typeset
This is the test file I've been using, called 'Test.tex':
\documentclass[12pt]{scrartcl}
\begin{document}
Testing
\end{document}
When compiling it in the command line with LaTeX I get
C:\Users\amize\XXXXX>latex Test.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (MiKTeX 20.11)
Sorry, but latex did not succeed.
The log file hopefully contains the information to get MiKTeX going again:
C:\Users\amize\AppData\Local\MiKTeX\2.9\miktex\log\latex.log
with PDF LaTeX I get
C:\Users\amize\XXXXX>pdflatex Test.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (MiKTeX 20.11)
Sorry, but pdflatex did not succeed.
The log file hopefully contains the information to get MiKTeX going again:
C:\Users\amize\AppData\Local\MiKTeX\2.9\miktex\log\pdflatex.log
I get essentially identical errors when trying to compile in TeXMaker, but I also get the following pop-up messages
The called-out log files are as follows: first latex.log
2020-11-27 19:59:53,825-0600 INFO latex - this process (6500) started by 'cmd' with command line: latex Test.tex
2020-11-27 19:59:53,840-0600 INFO latex - allowing known shell commands
2020-11-27 19:59:53,840-0600 INFO latex - enabling input (output) from (to) processes
2020-11-27 19:59:53,892-0600 INFO latex - going to create file: latex.fmt
2020-11-27 19:59:53,947-0600 INFO latex.core - start process: initexmf --enable-installer --dump-by-name=latex --engine=pdftex
2020-11-27 19:59:57,101-0600 ERROR latex - C:\Users\amize\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64\initexmf.exe did not succeed; exitCode: 1
2020-11-27 19:59:57,101-0600 ERROR latex - output:
2020-11-27 19:59:57,101-0600 ERROR latex -
Sorry, but "MiKTeX Configuration Utility" did not succeed.
The log file hopefully contains the information to get MiKTeX going again:
C:\Users\amize\AppData\Local\MiKTeX\2.9\miktex\log\initexmf.log
2020-11-27 19:59:57,101-0600 FATAL latex.core - The memory dump file could not be found.
2020-11-27 19:59:57,101-0600 FATAL latex.core - Data: fileName="latex.fmt"
2020-11-27 19:59:57,101-0600 FATAL latex.core - Source: Libraries\MiKTeX\TeXAndFriends\texmfapp.cpp:715
2020-11-27 19:59:57,101-0600 FATAL latex - The memory dump file could not be found.
2020-11-27 19:59:57,101-0600 FATAL latex - Info: fileName="latex.fmt"
2020-11-27 19:59:57,101-0600 FATAL latex - Source: Libraries\MiKTeX\TeXAndFriends\texmfapp.cpp
2020-11-27 19:59:57,101-0600 FATAL latex - Line: 715
2020-11-27 19:59:57,102-0600 INFO latex - this process (6500) finishes with exit code 1
then pdflatex.log
2020-11-27 20:00:13,616-0600 INFO pdflatex - this process (3436) started by 'cmd' with command line: pdflatex Test.tex
2020-11-27 20:00:13,625-0600 INFO pdflatex - allowing known shell commands
2020-11-27 20:00:13,626-0600 INFO pdflatex - enabling input (output) from (to) processes
2020-11-27 20:00:13,659-0600 INFO pdflatex - going to create file: pdflatex.fmt
2020-11-27 20:00:13,707-0600 INFO pdflatex.core - start process: initexmf --enable-installer --dump-by-name=pdflatex --engine=pdftex
2020-11-27 20:00:16,924-0600 ERROR pdflatex - C:\Users\amize\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64\initexmf.exe did not succeed; exitCode: 1
2020-11-27 20:00:16,924-0600 ERROR pdflatex - output:
2020-11-27 20:00:16,924-0600 ERROR pdflatex -
Sorry, but "MiKTeX Configuration Utility" did not succeed.
The log file hopefully contains the information to get MiKTeX going again:
C:\Users\amize\AppData\Local\MiKTeX\2.9\miktex\log\initexmf.log
2020-11-27 20:00:16,924-0600 FATAL pdflatex.core - The memory dump file could not be found.
2020-11-27 20:00:16,924-0600 FATAL pdflatex.core - Data: fileName="pdflatex.fmt"
2020-11-27 20:00:16,924-0600 FATAL pdflatex.core - Source: Libraries\MiKTeX\TeXAndFriends\texmfapp.cpp:715
2020-11-27 20:00:16,925-0600 FATAL pdflatex - The memory dump file could not be found.
2020-11-27 20:00:16,925-0600 FATAL pdflatex - Info: fileName="pdflatex.fmt"
2020-11-27 20:00:16,925-0600 FATAL pdflatex - Source: Libraries\MiKTeX\TeXAndFriends\texmfapp.cpp
2020-11-27 20:00:16,925-0600 FATAL pdflatex - Line: 715
2020-11-27 20:00:16,925-0600 INFO pdflatex - this process (3436) finishes with exit code 1
and finally initexmf.log
(for both of the above attempts)
2020-11-27 19:59:54,232-0600 INFO initexmf - this is MiKTeX Configuration Utility 4.1 (MiKTeX 20.11)
2020-11-27 19:59:54,233-0600 INFO initexmf - this process (10216) started by 'latex' with command line: initexmf --enable-installer --dump-by-name=latex --engine=pdftex
2020-11-27 19:59:54,233-0600 INFO initexmf - Operating on the private (per-user) MiKTeX setup
2020-11-27 19:59:54,243-0600 INFO initexmf - running: miktex-makefmt.exe --engine=pdftex --dest-name=latex --no-dump latex.ini --engine-option=-tcx=cp227.tcx --enable-installer --miktex-disable-maintenance --miktex-disable-diagnose
2020-11-27 19:59:54,299-0600 INFO initexmf.core - start process: miktex-makefmt.exe --engine=pdftex --dest-name=latex --no-dump latex.ini --engine-option=-tcx=cp227.tcx --enable-installer --miktex-disable-maintenance --miktex-disable-diagnose
2020-11-27 19:59:57,093-0600 ERROR initexmf - sub-process error output has been saved to 'C:\Users\amize\AppData\Local\MiKTeX\2.9\miktex\log\miktex-makefmt_2020-11-27-195957.out'
2020-11-27 19:59:57,093-0600 FATAL initexmf - The executed process did not succeed.
2020-11-27 19:59:57,093-0600 FATAL initexmf - Info: fileName="C:\Users\amize\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64\miktex-makefmt.exe", exitCode="1"
2020-11-27 19:59:57,093-0600 FATAL initexmf - Source:
2020-11-27 19:59:57,093-0600 FATAL initexmf - Line: 0
2020-11-27 19:59:57,094-0600 INFO initexmf - this process (10216) finishes with exit code 1
2020-11-27 20:00:13,993-0600 INFO initexmf - this is MiKTeX Configuration Utility 4.1 (MiKTeX 20.11)
2020-11-27 20:00:13,993-0600 INFO initexmf - this process (4632) started by 'pdflatex' with command line: initexmf --enable-installer --dump-by-name=pdflatex --engine=pdftex
2020-11-27 20:00:13,993-0600 INFO initexmf - Operating on the private (per-user) MiKTeX setup
2020-11-27 20:00:14,004-0600 INFO initexmf - running: miktex-makefmt.exe --engine=pdftex --dest-name=pdflatex --no-dump pdflatex.ini --engine-option=-tcx=cp227.tcx --enable-installer --miktex-disable-maintenance --miktex-disable-diagnose
2020-11-27 20:00:14,060-0600 INFO initexmf.core - start process: miktex-makefmt.exe --engine=pdftex --dest-name=pdflatex --no-dump pdflatex.ini --engine-option=-tcx=cp227.tcx --enable-installer --miktex-disable-maintenance --miktex-disable-diagnose
2020-11-27 20:00:16,917-0600 ERROR initexmf - sub-process error output has been saved to 'C:\Users\amize\AppData\Local\MiKTeX\2.9\miktex\log\miktex-makefmt_2020-11-27-200016.out'
2020-11-27 20:00:16,917-0600 FATAL initexmf - The executed process did not succeed.
2020-11-27 20:00:16,917-0600 FATAL initexmf - Info: fileName="C:\Users\amize\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64\miktex-makefmt.exe", exitCode="1"
2020-11-27 20:00:16,917-0600 FATAL initexmf - Source:
2020-11-27 20:00:16,917-0600 FATAL initexmf - Line: 0
2020-11-27 20:00:16,918-0600 INFO initexmf - this process (4632) finishes with exit code 1
The contents of the sub-process error output files are a bit long, for which I apologize (I couldn't figure out how to attach files). Both of them end the same way, with
! Undefined control sequence.
<argument> \document
This is miktex-makefmt_2020-11-27-195957.out
Running miktex-pdftex.exe...
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (MiKTeX 20.11) (INITEX)
entering extended mode
("C:/Users/amize/AppData/Local/Programs/MiKTeX 2.9/tex/latex/00miktex/latex.ini
"
(C:\Users\amize\AppData\Roaming\MiKTeX\2.9\tex/generic/config\pdftexconfig.tex)
("C:\Users\amize\AppData\Local\Programs\MiKTeX 2.9\tex/latex/base\latex.ltx"
("C:\Users\amize\AppData\Local\Programs\MiKTeX 2.9\tex/latex/base\texsys.cfg")
./texsys.aux found
\@currdir set to: ./.
Assuming \openin and \input
have the same search path.
Defining UNIX/DOS style filename parser.
catcodes, registers, parameters,
LaTeX2e <2020-10-01> patch level 2
(C:\Users\amize\AppData\Roaming\MiKTeX\2.9\tex/latex/l3kernel\expl3.ltx
(C:\Users\amize\AppData\Roaming\MiKTeX\2.9\tex/latex/l3kernel\expl3-code.tex
(C:\Users\amize\AppData\Roaming\MiKTeX\2.9\tex/latex/l3kernel\l3deprecation.def
))
! Undefined control sequence.
<argument> \document
l.91
and this is miktex-makefmt_2020-11-27-200016.out
,
Running miktex-pdftex.exe...
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (MiKTeX 20.11) (INITEX)
entering extended mode
("C:/Users/amize/AppData/Local/Programs/MiKTeX 2.9/tex/latex/00miktex/pdflatex.
ini"
(C:\Users\amize\AppData\Roaming\MiKTeX\2.9\tex/generic/config\pdftexconfig.tex)
("C:\Users\amize\AppData\Local\Programs\MiKTeX 2.9\tex/latex/base\latex.ltx"
("C:\Users\amize\AppData\Local\Programs\MiKTeX 2.9\tex/latex/base\texsys.cfg")
./texsys.aux found
\@currdir set to: ./.
Assuming \openin and \input
have the same search path.
Defining UNIX/DOS style filename parser.
catcodes, registers, parameters,
LaTeX2e <2020-10-01> patch level 2
(C:\Users\amize\AppData\Roaming\MiKTeX\2.9\tex/latex/l3kernel\expl3.ltx
(C:\Users\amize\AppData\Roaming\MiKTeX\2.9\tex/latex/l3kernel\expl3-code.tex
(C:\Users\amize\AppData\Roaming\MiKTeX\2.9\tex/latex/l3kernel\l3deprecation.def
))
! Undefined control sequence.
<argument> \document
My question is: what happened? How do I fix this? It feels like a problem on my end, in my local install, but I'm not experienced enough at the back end of LaTeX to know where to go looking for the error. Is it just a 'reinstall everything' situation, or is it easier or harder than that? Any assistance would be greatly appreicated.
Update 29 Nov 2020 16:19 CST
Here are my TEXMF root & link target directories, they seem to be the standard ones per the MikTeX documentation.
C:\Users\amize\AppData\Roaming\MiKTeX\2.9\tex/latex/l3kernel\expl3.ltx
and this is not the standard location. It should be like latex.ltx in C:\Users\amize\AppData\Local\Programs\MiKTeX 2.9\tex/latex. But I can't say how it got there.