11 April 2012

116. [Solved] Latex bug -- "tcfmgr: config file `tcfmgr.map' (usually in $TEXMFMAIN/texconfig) not found."

When using latexila or texmaker no dvi/ps/pdf is generated. No outright error is report though

When trying to generate the pdf in the terminal using latex e.g.

me@beryllium:~$ latex nature_draft.tex
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
kpathsea: Running mktexfmt latex.fmt
tcfmgr: config file `tcfmgr.map' (usually in $TEXMFMAIN/texconfig) not found.
I can't find the format file `latex.fmt'!
 kpsewhich -expand-var='$TEXMFMAIN'

which is the correct file structure as defined by texmf.cnf

kpsewhich texmf.cnf

So what the heck is going on? I've written articles, reviews and book in latex and never had a problem until now. Also, it only happens on one computer.

I ended up just fooling around. What solved it was doing
sudo texconfig rehash
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.
That's all. Really.

Minor note:
you can run texonfig interactively as well. Just make sure to run it using sudo.

Links to this post:


  1. I am currently writing my pHd thesis and jsut stumbled on the same issue. I think you saved my day.

    1. I understand how you feel -- I got my PhD ten years ago but am still traumatized from all the computer-related stuff that went down (and I was forced to use Windows 2000/MS Word). Worst experience: accidentally saving an empty file over my thesis...

      Luckily I'd emailed it off for proof-reading that morning and only lost half a day's worth of work.

      Your colleagues and supervisors aren't joking when they suggest that you back up regularly.

  2. Thank you, worked out fine!