Installing TexLive from Fedora repos

Typically I use the TL iso from CTAN, but I wanted to get TeXLive quickly on a system I don’t usually use, so I installed the following collections:

  • texlive-collection-basic
  • texlive-collection-fontutils
  • texlive-collection-fontsrecommended
  • texlive-collection-latex
  • texlive-collection-latexrecommended
  • texlive-collection-luatex
  • texlive-collection-xetex
  • texlive-collection-mathscience
  • texlive-collection-pictures
  • texlive-collection-metapost
  • texlive-collection-pstricks

However I kept getting errors like this (I’m using xelatex):

kpathsea: Running mktexfmt xelatex.fmt
mktexfmt: No such file or directory I can't find the format file `xelatex.fmt'!

Then I installed the following:

  • texlive-tex
  • texlive-biblatex
  • texlive-bibtex
  • texlive-latex
  • texlive-pdftex
  • texlive-xetex (this was already installed, but the others were not!)
  • texlive-luatex

I find it surprising that the tex, latex, pdftex, and luatex packages were not already included in the collections. I then tried to run texconfig rehash, but it errored out with:

texconfig rehash                                                                                                                                       
/usr/bin/texconfig: line 1304: mktexlsr: command not found

So I installed

  • texlive-texlive-scripts
  • texlive-texlive-scripts-extra
  • texlive-kpathsea

But I still cannot compile my document:

$ xelatex -interaction nonstopmode myfile
This is XeTeX, Version 3.141592653-2.6-0.999993 (TeX Live 2021) (preloaded format=xelatex)                                                                                                    
 restricted \write18 enabled.                                                                                                                                                                 
                                                                                                                                                                                              
kpathsea: Running mktexfmt xelatex.fmt                                                                                                                                                        
Can't locate TeXLive/TLUtils.pm in @INC (you may need to install the TeXLive::TLUtils module) (@INC contains: /usr/share/texlive/tlpkg /usr/share/texlive/texmf-dist/scripts/texlive /usr/loca
l/lib64/perl5/5.36 /usr/local/share/perl5/5.36 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /usr/bin/mktexfmt line 46.                     
BEGIN failed--compilation aborted at /usr/bin/mktexfmt line 46.                                                                                                                               
I can't find the format file `xelatex.fmt'!
$ pdflatex -interaction nonstopmode myfile
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021) (preloaded format=pdflatex)                                                                                                   
 restricted \write18 enabled.                                                                                                                                                                 
                                                                                                                                                                                              
kpathsea: Running mktexfmt pdflatex.fmt                                                                                                                                                       
Can't locate TeXLive/TLUtils.pm in @INC (you may need to install the TeXLive::TLUtils module) (@INC contains: /usr/share/texlive/tlpkg /usr/share/texlive/texmf-dist/scripts/texlive /usr/loca
l/lib64/perl5/5.36 /usr/local/share/perl5/5.36 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /usr/bin/mktexfmt line 46.                     
BEGIN failed--compilation aborted at /usr/bin/mktexfmt line 46.                                                                                                                               
I can't find the format file `pdflatex.fmt'!

The missing TLUtils.pm is provided by texlive-texlive.infra which is a dependency of texlive-texlive-scripts, texlive-texlive-scripts-extra and texlive-collection-basic, so it should already be in place.

Can you provide a minimal example of a failing document? It might help tracing down the error.

I think you should just install the whole texlive distribution rpm package array. Try

sudo dnf install texlive-*

and then give everything another go.

The TeXLive package maintainer has made the call to break out all of the TL separate elements, which is what you see when you use tlmgr, e.g., into individual rpm packages. I can certainly see why he’d do that, but that means that your best bet will be to install everything, too, and then, if you’d like, trim those down to what you normally use from the original TL interface via tlmgr.

Good luck!

I just install texlive-scheme-full

Yeah, that would do it, too, since it installs everything. :slight_smile:

Something is messed up with the package dependencies. I did not have texlive-texlive.infra installed on my system. So I dnf reinstalled texlive-texlive-scripts\* to check, a post installation script failed, but it didn’t pull in the infra package.

dnf reinstall texlive-texlive-scripts\*                                                                                                                
Last metadata expiration check: 2:09:43 ago on Saturday 15 April 2023 08:57:24 PM.
Dependencies resolved.                                                                                                                                                                        
==============================================================================================================================================================================================
 Package                                                     Architecture                         Version                                          Repository                            Size 
==============================================================================================================================================================================================
Reinstalling:                                                                                                                                                                                 
 texlive-texlive-scripts                                     noarch                               9:20210325-52.fc37                               fedora                               116 k 
 texlive-texlive-scripts-extra                               noarch                               9:20210325-52.fc37                               fedora                                62 k 
                                                                                                                                                                                              
Transaction Summary                                                                                                                                                                           
==============================================================================================================================================================================================
                                                                                                                                                                                              
Total download size: 177 k                                                                                                                                                                    
Installed size: 442 k                                                                                                                                                                         
Is this ok [y/N]: y                                                                                                                                                                           
Downloading Packages:    
(1/2): texlive-texlive-scripts-extra-20210325-52.fc37.noarch.rpm                                                                                              190 kB/s |  62 kB     00:00     
(2/2): texlive-texlive-scripts-20210325-52.fc37.noarch.rpm                                                                                                    344 kB/s | 116 kB     00:00    
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                         272 kB/s | 177 kB     00:00     
Running transaction check                                                                                                                                                                     
Transaction check succeeded.                                                                                                                                                                  
Running transaction test                                                                                                                                                                      
Transaction test succeeded.                                                                                                                                                                   
Running transaction                                                                                                                                                                           
  Preparing        :                                                                                                                                                                      1/1 
  Reinstalling     : texlive-texlive-scripts-extra-9:20210325-52.fc37.noarch                                                                                                              1/4 
  Reinstalling     : texlive-texlive-scripts-9:20210325-52.fc37.noarch                                                                                                                    2/4 
  Cleanup          : texlive-texlive-scripts-extra-9:20210325-52.fc37.noarch                                                                                                              3/4 
  Cleanup          : texlive-texlive-scripts-9:20210325-52.fc37.noarch                                                                                                                    4/4 
  Running scriptlet: texlive-texlive-scripts-9:20210325-52.fc37.noarch                                                                                                                    4/4 
Can't locate TeXLive/TLUtils.pm in @INC (you may need to install the TeXLive::TLUtils module) (@INC contains: /usr/share/texlive/tlpkg /usr/local/lib64/perl5/5.36 /usr/local/share/perl5/5.36
 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /usr/bin/updmap line 41.
BEGIN failed--compilation aborted at /usr/bin/updmap line 41.                                  

Can't locate TeXLive/TLUtils.pm in @INC (you may need to install the TeXLive::TLUtils module) (@INC contains: /usr/share/texlive/tlpkg /usr/local/lib64/perl5/5.36 /usr/local/share/perl5/5.36
 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /usr/bin/updmap line 41.
BEGIN failed--compilation aborted at /usr/bin/updmap line 41.

  Verifying        : texlive-texlive-scripts-9:20210325-52.fc37.noarch                                                                                                                    1/4 
  Verifying        : texlive-texlive-scripts-9:20210325-52.fc37.noarch                                                                                                                    2/4 
  Verifying        : texlive-texlive-scripts-extra-9:20210325-52.fc37.noarch                                                                                                              3/4 
  Verifying        : texlive-texlive-scripts-extra-9:20210325-52.fc37.noarch                                                                                                              4/4 

Reinstalled:
  texlive-texlive-scripts-9:20210325-52.fc37.noarch                                          texlive-texlive-scripts-extra-9:20210325-52.fc37.noarch                                         

Complete!

I then manually installed the infra package, and reinstalled the scripts packages, and this time there were no errors. When try to compile my document, I get this now:

This is XeTeX, Version 3.141592653-2.6-0.999993 (TeX Live 2021) (preloaded format=xelatex)
 restricted \write18 enabled.

kpathsea: Running mktexfmt xelatex.fmt
mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order):
mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes:
mktexfmt:   /home/sali/.texlive2021/texmf-config/web2c/fmtutil.cnf
mktexfmt [INFO]: writing formats under /home/sali/.texlive2021/texmf-var/web2c
mktexfmt [INFO]: Did not find entry for byfmt=xelatex skipped
mktexfmt [INFO]: total formats: 0
mktexfmt [INFO]: exiting with status 0
I can't find the format file `xelatex.fmt'!

So I ran this:

fmtutil-sys --all 
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /usr/share/texlive/texmf-config/web2c/fmtutil.cnf
fmtutil [INFO]: writing formats under /usr/share/texlive/texmf-var/web2c
fmtutil [WARNING]: You seem to have no formats defined in your fmtutil.cnf files!
fmtutil [INFO]: total formats: 0
fmtutil [INFO]: exiting with status 0

I have the feeling, because of the missing dependency, some post installation script failed, and now I have a misconfigured TeXLive install.


As for a minimal example, the document I was working on is just a letter. You could use the following:

\documentclass[11pt]{scrlttr2}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[normalem]{ulem}
\usepackage{hyperref}
\usepackage{microtype}
\usepackage{libertine}
\usepackage{polyglossia}
\setdefaultlanguage[variant=british]{english}
\usepackage{makerobust}
\MakeRobustCommand\begin
\MakeRobustCommand\end
\MakeRobustCommand\item
\setkomavar{fromname}{My Name}
\setkomavar{fromemail}{my@email.com}
\KOMAoption{fromemail}{false}
\KOMAoption{fromphone}{false}
\KOMAoption{fromurl}{false}
\KOMAoption{fromlogo}{false}
\KOMAoption{backaddress}{false}
\setkomavar{place}{}
\LoadLetterOption{NF}
\setkomavar{fromaddress}{My Name\\
City}
\KOMAoptions{foldmarks=false}
\date{\today}
\hypersetup{
 pdfauthor={My Name},
 pdftitle={A title},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={Emacs 28.2 (Org mode 9.5.5)}, 
 pdflang={English}}
\begin{document}

\setkomavar{title}{A title}

\begin{letter}{%
To address}

\opening{Dear Sir/Madam,}

Body of the letter

\closing{Yours sincerely,}


\end{letter}

\end{document}

I’m a bit low on disk space, but see my last response, I think I have a broken installation now because of incorrect dependencies. Not sure installing everything will fix it. It has to be in the correct order. Maybe the answer is to reinstall the collections again now that I have the missing texlive-texlive.infra package.

So, I ran your example and it compiled perfectly.

I have the following collections installed:

texlive-collection-basic 
texlive-collection-bibtexextra 
texlive-collection-binextra 
texlive-collection-context 
texlive-collection-fontsextra 
texlive-collection-fontsrecommended 
texlive-collection-fontutils 
texlive-collection-formatsextra 
texlive-collection-langenglish 
texlive-collection-langgerman 
texlive-collection-latex 
texlive-collection-latexextra 
texlive-collection-latexrecommended 
texlive-collection-luatex 
texlive-collection-mathscience 
texlive-collection-metapost 
texlive-collection-pictures 
texlive-collection-plaingeneric 
texlive-collection-pstricks 
texlive-collection-publishers 
texlive-collection-xetex 

List of installed TeXlive packages: https://paste.centos.org/view/7f66af07

I guess this proves it’s not just having the right packages installed. Some post-install script failed, leading to a broken installation. As I understand it, TL relies a lot of different caches which needs to be built at the time of installation. Any idea how to clean-up this mess?

I’d suggest to remove the whole TL installation and try again. Maybe inside a fresh container via toolbox? If you compile manually via command line it should not make any difference for your workflow.

I figured out what was wrong. I sometimes use R from the fedora repo, but not TeXLive. And R pulls in a lot of TL as dependency. So I work around it. Trying to install TL side-by-side with the workaround led to the problems. I had forgotten this was in place. I removed the workaround, and the current TL packages, and installed everything afresh. Now everything works!