Having trouble compiling latex files (missing latex.fmt)

I’m considering migrating from Ubuntu/Slackware to AlmaLinux, but none of my LaTeX files seem to compile. Any invocation of

latex whatever.tex

on whatever.tex that works on the other systems (both use texlive, I think), ends up with


This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex)
 restricted \write18 enabled.

kpathsea: Running mktexfmt latex.fmt
mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order):
mktexfmt:   /usr/share/texlive/texmf-dist/web2c/fmtutil.cnf
mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes:
mktexfmt:   /home/cduston/.texlive2020/texmf-config/web2c/fmtutil.cnf
mktexfmt [INFO]: writing formats under /home/cduston/.texlive2020/texmf-var/web2c
mktexfmt [INFO]: --- remaking latex with pdftex
mktexfmt: running `pdftex -ini   -jobname=latex -progname=latex -translate-file=cp227.tcx *latex.ini' ...
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (INITEX)
 restricted \write18 enabled.
 (/usr/share/texlive/texmf-dist/web2c/cp227.tcx)
entering extended mode
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/latex.ini
(/usr/share/texlive/texmf-dist/tex/generic/tex-ini-files/pdftexconfig.tex)
(/usr/share/texlive/texmf-dist/tex/latex/base/latex.ltx
(/usr/share/texlive/texmf-dist/tex/latex/base/texsys.cfg)
./texsys.aux found


\@currdir set to: ./.


Assuming \openin and \input 
have the same search path.


Defining UNIX/DOS style filename parser.

catcodes, registers, parameters,
LaTeX2e <2020-10-01> patch level 4
! LaTeX requires expl3.
<argument> \errmessage {LaTeX requires expl3}
                                             \batchmode \read -1 to \reserve...
l.1063   }
          

mktexfmt [INFO]: log file copied to: /home/cduston/.texlive2020/texmf-var/web2c/pdftex/latex.log
mktexfmt [ERROR]: running `pdftex -ini   -jobname=latex -progname=latex -translate-file=cp227.tcx *latex.ini >&2 </dev/null' return status: 1
mktexfmt [ERROR]: returning error due to option --strict
mktexfmt [INFO]: not selected formats: 12
mktexfmt [INFO]: failed to build: 1 (pdftex/latex)
mktexfmt [INFO]: total formats: 13
mktexfmt [INFO]: exiting with status 1
I can't find the format file `latex.fmt'!

so I see a few things in there. It appears that LaTeX needs something called expl3, not included in my install, or possibly it’s missing a file called latex.fmt. Currently, I have installed texlive-latex (and probably nothing else), and nothing is found when I

dnf search expl3

It appears like it might be in l3kernel, but if that’s a real dependency, it seems like that should have been installed with texlive-latex, yes? Any help? Thanks!

dnf provides */expl3.sty shows that texlive-l3kernel provides
/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3.sty

# dnf -q rq --groupmember texlive-l3kernel
texlive-l3kernel-9:20200406-26.el9_2.noarch
  @texlive

The package is in group ‘texlive’ (aka “TeX formatting system”).

# dnf -q rq --whatrequires texlive-l3kernel
texlive-breqn-9:20200406-26.el9_2.noarch
texlive-collection-latex-9:20200406-26.el9_2.noarch
texlive-fontspec-9:20200406-26.el9_2.noarch
texlive-l3experimental-9:20200406-26.el9_2.noarch
texlive-l3packages-9:20200406-26.el9_2.noarch
texlive-lualatex-math-9:20200406-26.el9_2.noarch
texlive-unicode-math-9:20200406-26.el9_2.noarch
texlive-xecjk-9:20200406-26.el9_2.noarch
texlive-xetex-9:20200406-26.el9_2.x86_64
texlive-xmltex-9:20200406-26.el9_2.noarch

The texlive-latex does not directly require texlive-l3kernel.
If I would dnf remove texlive-l3kernel it would remove only four dependent packages from my system, but 243 unused dependencies too, incuding the texlive-latex.


If I’d install texlive-l3kernel on “clean” system, then it would pull 244 other packages as dependencies, including the texlive-latex.

If I’d run dnf install @texlive (aka dnf group install texlive), then it would pull 491 packages with installed size: 859 M.

If I’d run dnf install texlive (as there is such “metapackage”), then it would pull 389 packages with installed size: 692 M.

On same system dnf install texlive-latex would install only 135 packages.


I presume that texlive is assumed to be installed as a group ‘texlive’, or at least the ‘texlive’ package. Neither of those pulls in all texlive packages from repo (and repo has only a subset of latex packages).

1 Like

Ok, you’re doing like a whole bunch of things I only moderately understand…but what I’m getting is that I’m correct that l3kernel is not a dependency of texlive, but latex does not run without l3kernel!

So to me, this is a package problem that needs to be addressed by whoever is in charge of packaging texlive, but now you’re saying there is something called a “group” in dnf (which I’ll go read about now), but perhaps the maintainer of that package thinks THAT’S the right way to install texlive, so nothing needs to be done except communicate better?

Is that the right interpretation? While I go do that group install and read about groups…

(Thanks!)

EDIT: Yeah, that totally worked, latex runs perfectly now!

Circular/mutual dependencies are problematic. They force co-install (and co-removal) of co-dependent packages. Therefore, packages are usually given (non-circular) tree relationships. The issue is to spot the root of such tree, as that package pulls in the rest of the tree.

Note how there is package ‘texlive’ and many ‘texlive-something’, package ‘kernel’ and many ‘kernel-something’, package ‘gcc-toolset-13’ and many ‘gcc-toolset-13-something’. Intuitively, the ‘texlive’, ‘kernel’, and ‘gcc-toolset-13’ look like roots of some trees.

For some reason the packagers of texlive have l3kernel to depend (indirectly) on latex, but latex does not depend on l3kernel. Both, however, are required (indirectly) by ‘texlive’.


Intuition would see a “tree” on ‘openssh’, ‘openssh-clients’, and ‘openssh-server’. It is not quite so. The ‘openssh’ has common files that both ‘openssh-clients’ and ‘openssh-server’ require. Installing package ‘openssh’ does not install either of the sub-packages.

Texlive has zillion optional subpackages. They may (or might not) explicitly depend on the “base packages”.


Package ‘kernel’ is practically empty. It merely requires some packages (that provide the actual kernel files). Likewise, the ‘texlive’ provides no files. These are a convenience to install multiple (sub)packages.

The dnf groups and modules (aka streams) are metadata within repository that list packages. These too are a convenience to install multiple packages. A (environment) group can contain other groups.