致命错误 luaotfload | load : × 无法在 Debian Bullseye (livetex-full 包) 上加载“fontloader”模块“basics-gen”

致命错误 luaotfload | load : × 无法在 Debian Bullseye (livetex-full 包) 上加载“fontloader”模块“basics-gen”

我希望 LuaTeX/LaTeX 专家能够帮助我解决这个问题。

我有一个在 Debian Bullseye 上运行的 Docker 容器,并且安装了textlive-full 包裹。完整安装如下:

apt-get update && 
apt-get install -y wget perl-tk fonts-noto-cjk "texlive-full=2020.20210202-3" &&
apt-get clean

.tex 文件如下所示:

\documentclass[a4paper,16pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[margin=0.8in]{geometry}
\usepackage{libertine}
\usepackage{graphicx}
\usepackage{multido}
\usepackage{paracol}
\usepackage{ulem}
\usepackage{color}
\usepackage{soul}
\usepackage{xurl}
\usepackage{enumitem}
\usepackage{hyperref}
\usepackage{tokcycle}
\usepackage{libertine}
\usepackage{enumitem}
\usepackage{tipa}
\hypersetup{pdfauthor={System},
            pdfproducer={System},
            pdfcreator={System}
            }

\newcommand{\cvspace}{\vskip 1.2em}

\overfullrule=0pt

%----------------------------------------------------------------------------------------
%   Field COMMAND
%----------------------------------------------------------------------------------------
\newcommand{\field}[2]{
\columnratio{0.20}
\setlength{\columnsep}{3em}
\begin{paracol}{2}
    \noindent\hspace{0pt}\textbf{#1} \switchcolumn \noindent{#2}
\end{paracol}
\cvspace
}
%----------------------------------------------------------------------------------------
%   Indent Field COMMAND
%----------------------------------------------------------------------------------------
\newcommand{\indentfield}[2]{
\columnratio{0.30}
\setlength{\columnsep}{3em}
\begin{paracol}{2}
\baselineskip=1pt
\hspace{0pt}\textbf{#1} \switchcolumn \noindent{#2}
\end{paracol}
\cvspace
}
%----------------------------------------------------------------------------------------
%   Text COMMAND
%----------------------------------------------------------------------------------------
\newcommand{\text}[1]{
\noindent{#1}
\cvspace
}
%----------------------------------------------------------------------------------------
%   header
%----------------------------------------------------------------------------------------
%Force new page%
\newcommand{\sectionbreak}{\clearpage}

%----------------------------------------------------------------------------------------
%   graphic COMMAND
%----------------------------------------------------------------------------------------
\newcommand{\graphic}[1]{
\begin{center}
    \includegraphics[width=0.48\textwidth]{#1}
\end{center}
}
%----------------------------------------------------------------------------------------
%   allgraphic COMMAND
%----------------------------------------------------------------------------------------
\newcommand{\allgraphic}[1]{
\begin{center}
    \saveimageresource{#1}
    \multido{\i=1+1}{\the\lastsavedimageresourcepages}{
    \includegraphics[page=\i,width=0.48\textwidth]{#1}
    }
\end{center}
}
%----------------------------------------------------------------------------------------
%   url
%----------------------------------------------------------------------------------------
\hypersetup{colorlinks=true,urlcolor=blue}
\urlstyle{same}
%----------------------------------------------------------------------------------------
%   section end
%----------------------------------------------------------------------------------------
\newcommand{\drawline}{\hrule \cvspace}
%----------------------------------------------------------------------------------------
%   New Paragraph
%----------------------------------------------------------------------------------------
\newcommand{\newpara}[0]{\\[3mm]}
%----------------------------------------------------------------------------------------
%   Table Headings
%----------------------------------------------------------------------------------------
\newcommand{\tableheadings}[1]{#1 \\}
%----------------------------------------------------------------------------------------
%   Table Row
%----------------------------------------------------------------------------------------
\newcommand{\tablerow}[1]{\hline #1 \\}
%----------------------------------------------------------------------------------------
%   Support Content Wrapping
%----------------------------------------------------------------------------------------
\newcommand\wraptext[1]{\tokcycle
  {\addcytoks{##1\penalty0\hskip0pt plus1pt\relax}}
  {\processtoks{##1}}
  {\addcytoks{##1}}
  {\addcytoks{##1}}
  {#1}\the\cytoks}
%----------------------------------------------------------------------------------------
%   Support for CJK Languages
%----------------------------------------------------------------------------------------
\directlua {
  luaotfload.add_multiscript("cjk", {
    Hang = "Noto Serif CJK KR:mode=harf;script=hang;",
    Hani = "Noto Serif CJK TC:mode=harf;script=hani;",
    Kana = "Noto Serif CJK JP:mode=harf;script=kana;",
    Hira = "Noto Serif CJK JP:mode=harf;script=hira;",
  })
  luaotfload.add_multiscript("cjk_bold", {
    Hang = "Noto Serif CJK KR/B:mode=harf;script=hang;",
    Hani = "Noto Serif CJK TC/B:mode=harf;script=hani;",
    Kana = "Noto Serif CJK JP/B:mode=harf;script=kana;",
    Hira = "Noto Serif CJK JP/B:mode=harf;script=hira;",
  })
}
\setmainfont[RawFeature={multiscript=cjk},BoldFeatures={RawFeature={multiscript=cjk_bold}}]{Libertinus Serif}

\begin{document}
% Above this line is standard and included in base.tex%s
\title{MainTitle}\author{SubTitle}\date{SubSubTitle}\maketitle
\end{document}

然后,当我尝试使用以下命令从 tex 文件生成 PDF 时:

/usr/bin/lualatex -halt-on-error -jobname output -output-format pdf output.tex

我在日志中收到以下错误:

This is LuaHBTeX, Version 1.12.0 (TeX Live 2020/Debian)  (format=lualatex 2023.3.10)  10 MAR 2023 12:56
 restricted system commands enabled.
**/app/working/latex_abcde12345_64609089851690_4946691330391035353/output.tex
(/app/working/latex_abcde12345_64609089851690_4946691330391035353/output.tex
LaTeX2e <2020-10-01> patch level 4
Lua module: luaotfload 2022-10-03 3.23 Lua based OpenType font support
Lua module: lualibs 2020-12-30 2.73 ConTeXt Lua standard libraries.
Lua module: lualibs-extended 2020-12-30 2.73 ConTeXt Lua libraries -- extended c
ollection.
luaotfload | load : FATAL ERROR
luaotfload | load :   × Failed to load "fontloader" module "basics-gen".
luaotfload | load :   × Error message:
luaotfload | load :     × "/etc/texmf/tex/lualatex/luaotfload/luaotfload-init.l
ua:301: system : no writeable cache path, quiting"./etc/texmf/tex/lualatex/luaot
fload/luaotfload-init.lua:301: system : no writeable cache path, quiting
stack traceback:
    [C]: in function 'error'
    /etc/texmf/tex/lualatex/luaotfload/luaotfload-init.lua:301: in function 'os.exi
t'
    /etc/texmf/tex/lualatex/luaotfload/luaotfload.lua:203: in local 'load_fontloade
r_module'
    /etc/texmf/tex/lualatex/luaotfload/luaotfload-init.lua:303: in upvalue 'init_ma
in'
    /etc/texmf/tex/lualatex/luaotfload/luaotfload-init.lua:590: in function 'luaotf
load-init.lua'
    /etc/texmf/tex/lualatex/luaotfload/luaotfload.lua:322: in field 'main'
    [\directlua]:1: in main chunk.
<everyjob> ...ring \\def\string \\encodingdefault{OT1}')end }
                                                  \let \f@encoding \encoding...
l.1 
  \documentclass[a4paper,16pt]{article}

Here is how much of LuaTeX's memory you used:
 8 strings out of 478824
 100000,383344 words of node,token memory allocated
 275 words of node memory still in use:
   1 hlist, 1 dir, 39 glue_spec nodes
   avail lists: 2:12,3:1,4:1
 19793 multiletter control sequences out of 65536+600000
 22 fonts using 2516239 bytes
 5i,0n,1p,114b,15s stack positions out of 5000i,500n,10000p,200000b,200000s
!  ==> Fatal error occurred, no output PDF file produced!

我设法让它工作的唯一方法是按照install-tl-20200406步骤手动安装这里。但是,这个安装过程可能需要很长时间(长达两个小时),理想情况下,我希望它非常快,在几分钟内完成。

有什么方法可以使这个模板 .tex 文件正常工作,加快安装过程,并使用 Debian 包使其工作而无需手动安装?

注意:在进行手动安装时,我执行以下操作:

RUN chmod -R +x /install-tl-20200406
RUN echo "I" | /install-tl-20200406/install-tl -repository ftp://tug.org/historic/systems/texlive/2020/tlnet-final
RUN chmod -R +x /usr/local/texlive/2020/bin/
RUN rm -rf /install-tl-20200406
RUN chmod o+w /usr/local/texlive/2020/texmf-var

答案1

经过进一步调查,我解决了这个问题,这似乎是权限问题。使用 texlive-luatex Debian 包,我需要向 Docker 用户提供权限,然后/var/lib/texmf它开始工作并且不再出现错误。

感谢@David Carlisle 和@Ulrike Fischer 的关注,\usepackage[utf8]{inputenc}这些\usepackage[T1]{fontenc}已被删除。

相关内容