Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal pdflatex error on Linux: memory dump file could not be found. #1053

Closed
1 task done
andrewdbate opened this issue Feb 15, 2022 · 10 comments
Closed
1 task done
Labels

Comments

@andrewdbate
Copy link

I am running MiKTeX on elementary OS 6.1, which is a derivative of Ubuntu 20.04 LTS (it uses a different desktop environment).

I have a file example.txt with the following contents:

\documentclass{article}
\begin{document}
Hello World!
\end{document}

When I attempt to run pdflatex I always get the following error:

$ pdflatex example.tex 
This is pdfTeX, Version 3.141592653-2.6-1.40.24 (MiKTeX 22.1) (preloaded format=pdflatex.fmt)
 restricted \write18 enabled.

Sorry, but pdflatex did not succeed.

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

  /home/andrew/.miktex/texmfs/data/miktex/log/pdflatex.log

Here is the contents of the log:

$ cat /home/andrew/.miktex/texmfs/data/miktex/log/pdflatex.log
2022-02-15 16:28:10,085Z INFO  pdflatex - this process (417116) started by bash in directory /home/andrew/Documents/Tenancy/bugfix with command line: pdflatex example.tex
2022-02-15 16:28:10,085Z INFO  pdflatex - this is MiKTeX-PDFTEX 4.10.0 (1.40.24) (MiKTeX 22.1)
2022-02-15 16:28:10,085Z INFO  pdflatex - allowing known shell commands
2022-02-15 16:28:10,089Z INFO  pdflatex - going to create file: pdflatex.fmt
2022-02-15 16:28:10,123Z INFO  pdflatex.core - forking...
2022-02-15 16:28:10,397Z ERROR pdflatex - /usr/bin/miktex did not succeed; exitCode: 1
2022-02-15 16:28:10,397Z ERROR pdflatex - output:
2022-02-15 16:28:10,397Z ERROR pdflatex - 
Sorry, but: The executed process did not succeed.

2022-02-15 16:28:10,397Z FATAL pdflatex.core - The memory dump file could not be found.
2022-02-15 16:28:10,397Z FATAL pdflatex.core - Data: fileName="pdflatex.fmt"
2022-02-15 16:28:10,397Z FATAL pdflatex.core - Source: Libraries/MiKTeX/TeXAndFriends/texmfapp.cpp:717
2022-02-15 16:28:10,397Z FATAL pdflatex - The memory dump file could not be found.
2022-02-15 16:28:10,397Z FATAL pdflatex - Info: fileName="pdflatex.fmt"
2022-02-15 16:28:10,397Z FATAL pdflatex - Source: Libraries/MiKTeX/TeXAndFriends/texmfapp.cpp
2022-02-15 16:28:10,397Z FATAL pdflatex - Line: 717
2022-02-15 16:28:10,398Z INFO  pdflatex - this process (417116) finishes with exit code 1

Any advice for additional debugging steps?

I have given all possible permissions to ~/.miktex/ by running chmod -R ugo=rwx ~/.miktex/ but this makes no difference (I get the same error).

Could it be because the memory dump file does not exist or could not be created? Or is this not relevant?

Strangely xelatex works just fine. It is only pdflatex that has the problem.

Attached is the MiKTeX installation report:
miktex-report.txt

@andrewdbate
Copy link
Author

andrewdbate commented Feb 15, 2022

I've done some code reading in texmfapp.cpp around line 717 (shown in the above error) and in findfile.cpp (in particular SessionImpl::Locate) and it appears that the file pdflatex.fmt is being searched for but it is not found.

Searching my system for pdflatex.fmt with sudo find / -name pdflatex.fmt shows that there is no such file on my system.

Out of curiosity, I checked on a working MiKTeX install on a Windows computer I have, and on that system I do indeed have a file called pdflatex.fmt located at C:\Users\andrew\AppData\Local\MiKTeX\2.9\miktex\data\le\pdftex\pdflatex.fmt. So it would seem (but I am no TeX expert) that this file is somehow missing on my Linux system.

Would I be correct in assuming that this file is missing from my installation? If so, how did that happen and how can I fix it?

Also note that this is a fresh OS install, and hence I have not upgraded MiKTeX from an earlier version (which therefore excludes the possibility of old files remaining from earlier versions of MiKTeX).

@andrewdbate
Copy link
Author

Now after installing updates I get a similar error with xelatex:

$ cat /home/andrew/.miktex/texmfs/data/miktex/log/xelatex.log
2022-02-15 19:43:40,030Z INFO  xelatex - this process (551522) started by make in directory /home/andrew/Git/test with command line: xelatex -synctex=1 -interaction=nonstopmode -quiet -output-directory=build example.tex
2022-02-15 19:43:40,030Z INFO  xelatex - this is MiKTeX-XETEX 4.7.1 (0.999993) (MiKTeX 22.1)
2022-02-15 19:43:40,031Z INFO  xelatex - allowing known shell commands
2022-02-15 19:43:40,032Z INFO  xelatex - setting output directory: /home/andrew/Git/test/build
2022-02-15 19:43:40,032Z INFO  xelatex - setting aux directory: /home/andrew/Git/test/build
2022-02-15 19:43:40,034Z INFO  xelatex - going to create file: xelatex.fmt
2022-02-15 19:43:40,067Z INFO  xelatex.core - forking...
2022-02-15 19:43:40,338Z ERROR xelatex - /usr/bin/miktex did not succeed; exitCode: 1
2022-02-15 19:43:40,338Z ERROR xelatex - output:
2022-02-15 19:43:40,338Z ERROR xelatex - 
Sorry, but: The executed process did not succeed.

2022-02-15 19:43:40,338Z FATAL xelatex.core - The memory dump file could not be found.
2022-02-15 19:43:40,338Z FATAL xelatex.core - Data: fileName="xelatex.fmt"
2022-02-15 19:43:40,338Z FATAL xelatex.core - Source: Libraries/MiKTeX/TeXAndFriends/texmfapp.cpp:717
2022-02-15 19:43:40,338Z FATAL xelatex - The memory dump file could not be found.
2022-02-15 19:43:40,338Z FATAL xelatex - Info: fileName="xelatex.fmt"
2022-02-15 19:43:40,338Z FATAL xelatex - Source: Libraries/MiKTeX/TeXAndFriends/texmfapp.cpp
2022-02-15 19:43:40,338Z FATAL xelatex - Line: 717
2022-02-15 19:43:40,339Z INFO  xelatex - this process (551522) finishes with exit code 1

@andrewdbate
Copy link
Author

andrewdbate commented Feb 15, 2022

When I was getting the above errors I was attempting to use MiKTeX with a system-wide installation.

Here is a workaround for anyone facing the same issue: choose user mode instead of system-wide configuration on the inital run of the MiKTeX console.

I removed the miktex package with apt remove miktex and then apt autoremove. I then deleted the ~/.miktex directory. I also searched through the filesystem for all files with names containing miktex to make sure I left nothing behind. I then reinstalled with apt install miktex. On the first run of the MiKTeX console, I chose to install for the current user only. This setup works without problems and I am able to compile with both pdftex and xelatex.

I also separately attempted to reinstall and then choose a system-wide setup of MiKTeX on the first run of the MiKTeX console, and I got the same errors as reported above, so it seems that the above error can be reproduced when using a system-wide configuration.

@edocevoli
Copy link
Member

Thank you. The first log snippet mentions the miktex utility:

2022-02-15 16:28:10,397Z ERROR pdflatex - /usr/bin/miktex did not succeed; exitCode: 1

So the next step, if this happens again, would be to inspect miktex.log.

@andrewdbate
Copy link
Author

Thanks for your reply. Would it be possible to update https://miktex.org/howto/bug-report to include the directories on Linux where the miktex.log can be found?

I did try to follow the instructions, but section "1.4. MiKTeX history" is only described for Windows, so I assumed it was Windows-specific.

If I can, I will try to reproduce this and include the miktek.log. Thanks!

@stale
Copy link

stale bot commented Apr 18, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 18, 2022
@stale stale bot closed this as completed Apr 27, 2022
@manueldeprada
Copy link

Leaving this for the record. For me, the solution was

  1. Add $HOME/bin to the PATH in bashrc. Restart.
  2. from terminal, execute: cd ~/.miktex/texmfs/install/miktex/config && miktex-makefmt --engine=pdftex --dest-name=pdflatex --no-dump pdflatex.ini

@Janosch143
Copy link

Leaving this for the record. For me, the solution was

1. Add $HOME/bin to the PATH in bashrc. Restart.

2. from terminal, execute: `cd ~/.miktex/texmfs/install/miktex/config && miktex-makefmt --engine=pdftex --dest-name=pdflatex --no-dump pdflatex.ini`

Thanks for this, it also solved this issue for me!

@markus-seidl
Copy link

For me the solution was to us Miktex-Console and Upgrade to the standard version.

@volodya-lombrozo
Copy link

I had the same issue, and the following steps helped me:

  • Open MiKTeX Console.
  • Click on the "Overview" tab.
  • At the bottom, locate the "Upgrade" box.
  • Click "Upgrade now."

This will upgrade the minimal TeX installation to a standard TeX installation

@MiKTeX MiKTeX locked and limited conversation to collaborators Sep 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants