Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

For no particular reason that I could identify, I was faced with the impossibility to compile any latex document and invariably got this error message each time I tried :

LaTeX: problems after [0] pages

kpathsea: Running mktexfmt pdflatex.fmt
tcfmgr: config file `tcfmgr.map' (usually in $TEXMFMAIN/texconfig) not found.
I can't find the format file `pdflatex.fmt'!
share|improve this question

2 Answers 2

up vote 6 down vote accepted

I thought I would post this here because it gave me some cold sweats as I could not make any sens of the errror message and have only two month remaining to write my thesis.

In a terminal, just type

sudo texconfig rehash

which should gives

mktexlsr: Updating /var/lib/texmf/ls-R-TEXMFMAIN...
mktexlsr: Updating /var/lib/texmf/ls-R-TEXLIVE...
mktexlsr: Updating /var/lib/texmf/ls-R...
mktexlsr: Done.

This solution was found on this website.

share|improve this answer
This answer led to another question. It is easier and more conventional to simply use sudo texhash. –  Serge Stroobandt Jun 20 '13 at 9:31
Both rehash and texhash produce an analogous output, but I am still returned the same errore message. –  Delio Sep 25 '14 at 13:23

For me I simply had to copy the .fmt file into the directory the PHP file was calling it from. It worked fine from a terminal but gave the error when running via PHP.

share|improve this answer
Welcome to TeX.SX! I don't see that this answers the question, which doesn't mention PHP at all. –  Andrew Swann Feb 17 at 16:04
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. –  Kurt Feb 17 at 16:57
It is the same error I got when running the command via PHP, which is why this question came up during my search. I found, and posted the solution that worked for me in case it helps someone else that has a similar problem. While this user doesn't specify PHP, they also don't say they were using ASP, CFM, .NET, Python, so my solution could be extremely applicable. –  Alan Feb 18 at 16:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.