Pages

11 April 2012

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


Symptom:
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'
gives
/usr/share/texmf/

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

kpsewhich texmf.cnf
/usr/share/texmf/web2c/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.

Solution:
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:
http://tex.stackexchange.com/questions/64894/error-i-cant-find-the-format-file-pdflatex-fmt

3 comments:

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

    ReplyDelete
    Replies
    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.

      Delete
  2. Thank you, worked out fine!

    ReplyDelete