pythonpdfjupyter-notebookxelatex

kpathsea: Running mktexfmt xelatex.fmt can't find the format file `xelatex.fmt'


I am getting errors while exporting the notebook as a pdf, Am using RHEL-7.9 and running jupyter lab with python 3.6, and following the documentation to install dependencies.

I tried almost everything but did not find the solution.

Error:

nbconvert failed: PDF creating failed, captured latex output: Failed to run "['xelatex', 'notebook.tex', '-quiet']" command: This is XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013) restricted \write18 enabled.

pathsea: Running mktexfmt xelatex.fmt

I can't find the format file `xelatex.fmt'!


Solution

  • Reference

    Run:

    1. yum update

    2. yum install perl

    3. yum install perl-Digest-MD5

    4. wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz

    5. tar -xf install-tl-unx.tar.gz

    6. cd install-tl-20211117

    7. sudo -s

    8. ./install-tl
      After that you will see some text, It will ask about Input you can select I as option.

    9. vi ~/.bashrc

    10. export PATH=/usr/local/texlive/2021/bin/x86_64-linux/:$PATH source ~/.bashrc

    11. yum install texlive-xetex texlive-fonts-recommended texlive-plain-generic