21

I just updated my TeXLive installation on my iMac and got the following error message:

   /usr/local/texlive/2020/texmf-dist/tex/latex/l3kernel/expl3.sty:77: LaTeX3 Error: 
    Mismatched LaTeX support files detected.
    (LaTeX3)        Loading 'expl3.sty' aborted!
    (LaTeX3)        
    (LaTeX3)        The L3 programming layer in the LaTeX format
    (LaTeX3)        is dated 2020-10-27, but in your TeX tree the files require
    (LaTeX3)        at least 2020-12-07.

What to do?

7
  • 2
    you need to recreate the latex formats (with fmtutil-sys). Also check if you have some local formats around which hide the system formats. (with eg kpsewhich --all --engine=pdftex pdflatex.fmt) Commented Dec 30, 2020 at 12:19
  • @Ulrike Fischer ` ~ % kpsewhich --all --engine=pdftex pdflatex.fmt /Users/ugroh/Library/texlive/2020/texmf-var/web2c/pdftex/pdflatex.fmt /usr/local/texlive/2020/texmf-var/web2c/pdftex/pdflatex.fmt`
    – Ulrich
    Commented Dec 30, 2020 at 12:36
  • 3
    two formats is always suspicious. Run fmtutil-sys --all, check which formats it updates and then delete the formats in the other tree. Commented Dec 30, 2020 at 12:42
  • It worked as recommended. But I am wondering why I have in the ~/Library such a file.
    – Ulrich
    Commented Dec 30, 2020 at 12:55
  • 1
    do you need sudo to access the main tree? If you rebuild the formats when you don't have write access to the main tree they can get built in your local area Commented Dec 30, 2020 at 13:49

3 Answers 3

28

It may be useful to others: I had to run fmtutil-user --all (rather than fmtutil-sys) to recreate the format in my local tree and fix lualatex.

4
  • I also have the same problem. I tried to do that but it didn't work for me. Any clue what should I do?
    – masrosid
    Commented Mar 23, 2021 at 13:20
  • 1
    ! LaTeX3 Error: Mismatched LaTeX support files detected. (LaTeX3) Loading 'expl3.sty' aborted! (LaTeX3) (LaTeX3) The L3 programming layer in the LaTeX format (LaTeX3) is dated 2020-12-07, but in your TeX tree the files require (LaTeX3) at least 2021-02-18. For immediate help type H <return>. ... l.77 \ExplLoaderFileDate{expl3.sty}} %
    – masrosid
    Commented Mar 23, 2021 at 13:21
  • 1
    @masrosid See here: tex.stackexchange.com/q/586467/4736 and the comments. I found a unwanted local pdflatex.fmt and simply renamed it.
    – Keks Dose
    Commented Mar 24, 2021 at 18:15
  • This solved my issue after a TexLive update!
    – umit1010
    Commented Sep 9, 2023 at 19:08
10

This error can also temporarily appear when attempting to TeX a file while the TeXLive utility is updating. The best advice in that case is to wait until the update finishes and then proceed with building the document.

0
2

Possibly also of interest for others: I had the same error, and though Sino7's answer is the correct one fmtutil-sys --all did not work properly at first. It kept looking for old packages (dehyph-t-x-2019-[...]): in that case you have to manually (re)generate language.dat/def files, running " fmtutil generate language " which will tell you exactly the command to run. After these files were correctly regenerated, fmtutil-sys --all worked perfectly!

3
  • how to regenerate language.dat/def files? When I do fmtutil generate language /usr/local/texlive/2020/bin/x86_64-linux/fmtutil: Unexpected non-option argument(s): generate language Try "fmtutil --help" for more information.
    – masrosid
    Commented Mar 30, 2021 at 7:37
  • Try "fmtutil generate language" (ie without argument) - it should answer which proper command to run and the correct argument
    – Paul Javal
    Commented Mar 30, 2021 at 17:45
  • 2
    I already installed the texlive version 2021 today because no solution worked for me.
    – masrosid
    Commented Apr 2, 2021 at 13:28

You must log in to answer this question.

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