[Tex/LaTex] pdflatex error: latex.fmt doesn’t match pdftex.pool

errorsformat-filestexlive

I'm having some problems trying to get a portable TeX Live installation working. It started off great, but I tried to use tlmgr to add some packages and now whenever I run pdflatex I get a weird error.

Google isn't being much help – most of the discussions are about a bug in the system install for some Linux distros (which I'm not using) or they suggest I run fmtutil --all which completes without error but doesn't fix the problem.

I'm not sure what to try next. This is what happens when I run pdflatex:

$ ./bin/x86_64-linux/pdflatex
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)
 restricted \write18 enabled.
**t
---! ./texmf-var/web2c/pdftex/pdflatex.fmt doesn't match pdftex.pool
(Fatal format file error; I'm stymied)

There is no pdftex.pool file in the portable install or in my system installation (which does work.)

Any idea what the problem is or what I can try next?

Best Answer

Modern pdftex embeds the "pool file" in the executable, so this message means the format was created with a different executable. Running fmtutil --all normally puts generated formats in $HOME/.texlive2013/texmf-var/web2c/ and these should be used in preference to the system texmf-var/web2c versions. You should be able to locate the generated format and log files, e.g., using locate pdflatex.fmt. This information could help pinpoint your problem.

Given the information you provide, it is impossible to say what broke. Did you set the PATH in your terminal session as mentioned in the portable texlive instructions?

fmtutil normally puts generated formats in $HOME/.texlive2013/texmf-var/web2c, so breaks portability. If you actually used sudo fmtutil --all then $HOME would be root's value, and any generated formats would not be available to other users.

You probably want to use fmtutil-sys --all (with the PATH set appropriately) to have the generated formats go into the portable texmf-var tree (e.g., are stored on the USB key with the rest of texlive).