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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I try to update packages via tlmgr (or run fmtutil-sys --all directly), TeXLIve reports:

/usr/local/texlive/2013/bin/i386-linux/fmtutil: 395: /usr/local/texlive/2013/bin/i386-linux/fmtutil: /usr/local/texlive/2013/texmf/texconfig/tcfmgr: not found
fmtutil: config file `fmtutil.cnf' not found.

kpsewhich fmtutil.cnf reports "/usr/local/texlive/2013/texmf-var/web2c/fmtutil.cnf"

This was a clean install of TeX Live 2013, so I'm not sure what went wrong (or how to fix it).

share|improve this question
Have you tried to call tlmgr check all? – Paul Gaborit Jul 15 '13 at 8:30
There is no <YEAR>/texmf tree any more, so it's quite strange fmtutil-sys points to that directory. It's possible you have set some TeX-related variable in the environment. What does env|grep TEX print? – egreg Jul 15 '13 at 10:56
@PaulGaborit: it exits unsuccessfully (status 1). – emacsomancer Jul 15 '13 at 16:28
@BeSlayed Remove the setting of those variables from your environment. They are useless and the second is wrong, actually the most likely candidate to be the culprit. – egreg Jul 15 '13 at 16:54
@BeSlayed It's quite normal that tlmgr check all finds some ‘inconsistency’. – egreg Jul 15 '13 at 22:43
up vote 2 down vote accepted

You have set the variables TEXMF and TEXMFLOCAL in your environment, which is not unrecommended.

The TeX programs in the TeX Live distribution are able to figure out the right value for these variables at runtime, by reading the texmf.cnf files they find in the appropriate locations. Such locations are determined by asking the system where the running binary is located. In a typical (vanilla) TeX Live 2013, binaries are stored in


(where <arch> depends on the machine and running operating system). From asking the operating system, the running program knows the value of SELFAUTOPARENT, in this case /usr/local/texlive/2013 and tries to read a texmf.cnf file there, if existent. Then it reads


and this is where your setting failed. The TeX programs never override the value of a variable that has already been set. So the second texmf.cnf file doesn't set TEXMF to the correct value for the 2013 distribution, which should be


while TeX Live 2012 set it to /usr/local/texlive/2012/texmf. This is where the thing went wrong.

Moral of the story: never set the TEX... variables in the environment, with the possible exception of TEXINPUTS. Other ...INPUTS variables can also be set, check the documentation.

share|improve this answer
Thanks again. I don't recall why I had defined those variables originally, but I had set them a number of years ago and kept "updating" them for new TeXLive versions. – emacsomancer Jul 16 '13 at 2:22

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.