kpathsea: 运行 mktexfmt xelatex.fmt 找不到格式文件 `xelatex.fmt'

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

我在将笔记本导出为 pdf 时遇到错误,我正在使用 RHEL-7.9 和 运行 jupyter lab 以及 python 3.6,并遵循 documentation to install dependencies.

我几乎尝试了所有方法,但没有找到解决方案。

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'!

参考:https://www.systutorials.com/how-to-install-tex-live-on-centos-7-linux/

yum 更新

yum 安装 perl

yum 安装 perl-Digest-MD5

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

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

cd install-tl-20211117

sudo -s

./install-tl 之后你会看到一些文字,它会询问输入你可以 select (I) 作为选项。

vi ~/.bashrc

导出路径=/usr/local/texlive/2021/bin/x86_64-linux/:$路径 来源 ~/.bashrc

yum 安装 texlive-xetex texlive-fonts-recommended texlive-plain-generic