首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Latexmk:在Gitalb CI中找不到命令

Latexmk:在Gitalb CI中找不到命令
EN

Stack Overflow用户
提问于 2021-12-10 10:54:00
回答 1查看 240关注 0票数 1

我试图在Gitlab中使用一个自动将.tex文件编译成PDF的CI来创建一个存储库。

因此,使用LaTeX (https://gitlab.com/gitlab-org/gitlab-foss/-/blob/master/lib/gitlab/ci/templates/LaTeX.gitlab-ci.yml)的Gtilab模板,我的.gtilab-ci.yml如下所示。

代码语言:javascript
复制
variables:
 
  LATEX_IMAGE: listx/texlive:2020

build:
  image: $LATEX_IMAGE
  script:
    - latexmk -pdf

  artifacts:
    paths:
      - "main.pdf"

而且,在我的主存储库中,显然有一个main.tex。

提交更改时,作业按假定的方式启动,但在执行脚本时失败。谨随函附上日志,以供参考:

代码语言:javascript
复制
Running with gitlab-runner 14.5.1 (de104fcd)
  on selenium
Preparing the "shell" executor 00:00
Using Shell executor...
Preparing environment 00:00
Running on selenium...
Getting source from Git repository 00:00
Fetching changes with git depth set to 50...
Bestehendes Git-Repository in /some/anonymised/path neuinitialisiert
Checking out 4f46c62b as feature-setup...
Skipping Git submodules setup
Executing "step_script" stage of the job script 00:00
$ latexmk -pdf
bash: Zeile 120: latexmk: Kommando nicht gefunden.
Cleaning up project directory and file based variables 00:00
ERROR: Job failed: exit status 1

我是相当新的CI/CD实现与Gitlab在一般。因此,我不知道要进一步调试什么,以及问题可能在哪里。

提前感谢!

EN

回答 1

Stack Overflow用户

发布于 2021-12-10 11:35:08

任务是使用GitLab 弹壳执行器 (来自log:Preparing the "shell" executor 00:00),它将在本地机器上运行script命令,而不是在指定的Docker容器中运行。

一些解决办法是:

  • 在主机上安装GitLab 码头转轮 (更好的选项),或
  • texlive安装到运行gitlab-runner的本地计算机上
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70303393

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档