19

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?

1
  • 1
    One possibility is that fmtutil used the system installed TeX distribution binaries rather than the portable ones. There is no pdftex.pool file because it has been incorporated in the binaries; that's the origin of my feeling. Possibly a PATH problem
    – egreg
    Commented Jul 17, 2013 at 14:31

4 Answers 4

21

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).

4
  • Thanks for the reply! No, I have not set any path. The only instructions I can find are at tug.org/texlive/doc/texlive-en/texlive-en.html#tlportable but they don't mention anything about setting paths. If I put the portable TeXLive's bin/x86_64-linux/ path first, running fmtutil --all still doesn't work - but the output does mention /usr/share which is wrong because this is outside my portable install. Same for fmtutil-sys --all. I am not running as root. I can't seem to find any more docs about the portable install - any pointers?
    – Malvineous
    Commented Jul 17, 2013 at 22:32
  • 1
    tug.org/texlive/doc/texlive-en/texlive-en.html#tlportable has: "To run TEX using this portable installation, you need to add the appropriate binary directory to the search path during your terminal session, as usual." For linux there is very little difference between a portable install and a normal CTAN TeX Live install, so use the normal documentation.
    – George
    Commented Jul 20, 2013 at 11:35
  • Any progress on this? I get this error just by running pdfjam in a SuSE 12-->13.2 installation.
    – rwst
    Commented Mar 17, 2015 at 9:45
  • I had the same problem when upgrading Ubuntu from 14.04 to 16.04 and the command fmtutil --all resolved the issue. Commented Aug 23, 2016 at 13:07
6

I faced a similar problem. I was able to solve it using sudo fmtutil-sys --all command on my Arch-linux box. The reply by @doed was helpful.

1
  • I still don't understand what this command do and why updating TeX packages (using the official TeX Live distribution updater) broke everything, but it worked.
    – Louis Lac
    Commented Nov 3, 2021 at 10:47
4

I had the same problem: at the same folder where one is running LaTeX, there was an obsolete latex.fmt file. Please, erase it.

0
3

I had exactly the same problem and running sudo fmtutil-sys --all did not help. I then used locate pdflatex.fmt to find all instances of the troublesome file. locate pointed me to the following locations:

/home/phx/.texmf-var/web2c/pdftex/pdflatex.fmt
/home/phx/.texmf-var-BackUp/web2c/pdftex/pdflatex.fmt
/var/lib/texmf/web2c/pdftex/pdflatex.fmt

I then copied /var/lib/texmf/web2c/pdftex/pdflatex.fmt to /home/phx/.texmf-var/web2c/pdftex/pdflatex.fmt. After this everything worked out fine again.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .