首页 > 解决方案 > 运行 install-tl 时出错“collection-basic 的配置文件键必须是 0 或 1,而不是:1”

问题描述

我在尝试使用自定义配置文件在 Docker 中从头开始构建 texlive 时遇到了一个非常奇怪的错误,请注意这个曾经可以工作的确切代码,但是在对 texlive 安装程序进行一些更新后,我现在得到了这些错误。

运行时出现错误,这./install-tl --profile ../texlive.profile对我来说 ./install-tl: Quitting, profile key for collection-basic must be 0 or 1, not: 1没有意义。

这是发生这种情况的 TexLive 安装程序中的行,但老实说,我无法从中做出任何事情,无法理解 perl,并且在谷歌上搜索此错误一无所获。

非常感谢任何帮助,这阻碍了我们的开发流程。

这里的上下文是我需要构建和打包一个非常轻量级的 texlive 发行版,以便在 AWS 的 Lambda 服务中运行

这是我的 Dockerfile :

FROM lambci/lambda:build-python3.7

# The TeXLive installer needs md5 and wget.
RUN yum -y install perl-Digest-MD5 && \
    yum -y install wget

WORKDIR /opt

# Download TeXLive installer.
ADD http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz /opt

# Minimal TeXLive configuration profile.
COPY texlive.profile /opt

# Install base TeXLive system.
RUN tar xf install*.tar.gz
RUN cd install-tl-* && \
    ./install-tl --profile ../texlive.profile


ENV PATH=/opt/texlive/bin/x86_64-linux:$PATH


# Install latexmk.
RUN tlmgr install latexmk

# Remove LuaTeX.
RUN tlmgr remove --force luatex

# Remove large unneeded files.
RUN rm -rf /opt/texlive/tlpkg/texlive.tlpdb* \
           /opt/texlive/texmf-dist/source/latex/koma-script/doc \
           /opt/texlive/texmf-dist/doc 

RUN mkdir -p /opt/texlive/tlpkg/TeXLive/Digest/ && \
    mkdir -p /opt/texlive/tlpkg/TeXLive/auto/Digest/MD5/ && \
    cp /usr/lib64/perl5/vendor_perl/Digest/MD5.pm \
       /opt/texlive/tlpkg/TeXLive/Digest/ && \
    cp /usr/lib64/perl5/vendor_perl/auto/Digest/MD5/MD5.so \
       /opt/texlive/tlpkg/TeXLive/auto/Digest/MD5

FROM lambci/lambda:build-python3.6

WORKDIR /opt

ENV PATH=/opt/texlive/bin/x86_64-linux:$PATH
ENV PERL5LIB=/opt/texlive/tlpkg/TeXLive/

COPY --from=0 /opt/ /opt/

这是我的 texlive.profile

selected_scheme scheme-custom
TEXDIR /opt/texlive
TEXMFSYSCONFIG /opt/texlive/texmf-config
TEXMFSYSVAR /opt/texlive/texmf-var
TEXMFLOCAL /opt/texlive/texmf-local
TEXMFHOME /tmp/texmf
TEXMFCONFIG /tmp/texmf-config
TEXMFVAR /tmp/texmf-var
binary_x86_64-linux 1
collection-basic 1
collection-latex 1
instopt_adjustpath 0
instopt_adjustrepo 1
instopt_letter 0
instopt_portable 0
instopt_write18_restricted 1
tlpdbopt_autobackup 0
tlpdbopt_backupdir tlpkg/backups
tlpdbopt_create_formats 0
tlpdbopt_desktop_integration 0
tlpdbopt_file_assocs 0
tlpdbopt_generate_updmap 0
tlpdbopt_install_docfiles 0
tlpdbopt_install_srcfiles 0
tlpdbopt_post_code 1

我正在运行它只是调用docker build -t local/lambdalatex .

标签: dockerperlaws-lambdalatex

解决方案


推荐阅读