[NTG-context] Problem with ConTeXt installation

Sanjoy Mahajan sanjoy at mrao.cam.ac.uk
Sat Sep 30 23:02:04 CEST 2006

> So I simply copied /root/.texmf-var/web2c/pdfetex/*     /var/lib/texmf/web2c/
> "texexec new.tex" seems to run OK now, without error.
> I'll investigate further.

You run texexec as root, I'm guessing, so that the formats will be
visible to all users.  However, that means they go into root's
.texmf-var/ directory because the TEXFORMATS kpse variable contains
the home-directory .texmf-var before /var/lib/texmf.  Here's how to

$ kpsewhich --expand-path='$TEXFORMATS'

Yup, ~/.texmf-var/web2c comes first.

That's due to these lines in /etc/texmf/texmf.cnf, at least on my
Ubuntu (teTeX 3.0) system:


TEXFORMATS = .;$TEXMF/web2c/{$engine,}

The TEXMFVAR is short for $HOME/.texmf-var and is what means the
formats go in /root/.texmf-var/.  So, you need to change TEXFORMATS
for the texexec run, telling it to place them in /var/lib/texmf:

# TEXFORMATS='/var/lib/texmf/web2c/{$engine,}' texexec --make --all

Or slightly more general, in case TEXMFSYSVAR changes someday from
/var/lib/texmf (note all the horrid quoting):

# TEXFORMATS=`kpsewhich --expand-path='$TEXMFSYSVAR'`'/web2c/{$engine,}' \
  texexec --make --all

I just tried it as root, and it seemed to work -- I got brand-new
formats in /var/lib/texmf/web2c/pdfetex:

# ls /var/lib/texmf/web2c/pdfetex/*.fmt

> # for f in `kpsewhere -engine=pdfetex cont-en.fmt`; do ls -l ${f}; done

Or slightly simpler (using -U to preserve the order produced by

# ls -lU `kpsewhere -engine=pdfetex cont-en.fmt`


# kpsewhere -engine=pdfetex cont-en.fmt | xargs ls -Ul


`Never underestimate the evil of which men of power are capable.'
         --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.

More information about the ntg-context mailing list