【问题标题】:How to install pdflatex in heroku如何在heroku中安装pdflatex
【发布时间】:2018-05-04 04:00:17
【问题描述】:

我使用烧瓶将降价转换为 pdf 转换器。转换不起作用,并显示内部服务器错误。

为了跟踪它,我运行heroku logs 并收到此错误:

2018-05-04T03:38:26.134931+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/pypandoc/__init__.py", line 325, in _convert_input
2018-05-04T03:38:26.134932+00:00 app[web.1]:     'Pandoc died with exitcode "%s" during conversion: %s' % (p.returncode, stderr)
2018-05-04T03:38:26.134942+00:00 app[web.1]: RuntimeError: Pandoc died with exitcode "47" during conversion: b'pdflatex not found. Please select a different --pdf-engine or install pdflatex\n'

这是有道理的,因为我使用 pandoc 进行转换。

为了解决这个错误,我尝试寻找支持 pdflatex 的 buildpack。不幸的是,我找不到任何东西。

所以,我尝试另一种可能的解决方案,通过heroku run 安装 pdflatex。

gofrendi@asgard:~/Projects/markdown-to-moodle-xml$ heroku run apt-get install pdflatex
Running apt-get install pdflatex on ⬢ m2m-py... up, run.7496 (Free)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
W: Not using locking for read only lock file /var/lib/dpkg/lock
E: Unable to locate package pdflatex

但可能我在某个地方犯了错误。

我的问题是:如何在我的 heroku 应用上安装 pdflatex?

【问题讨论】:

  • 这个包不是叫pdflatex,是sudo apt-get install texlive-full

标签: heroku pandoc pdflatex


【解决方案1】:

无需自定义 buildpack - 您始终可以在 heroku.yaml 指令中定义要安装的软件包:

build:
  packages:
    - texlive-latex-base
    - texlive-fonts-recommended
    - texlive-fonts-extra
    - texlive-latex-extra

【讨论】:

    猜你喜欢
    • 2021-07-07
    • 2021-12-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-06-12
    • 2017-01-04
    • 2020-11-01
    相关资源
    最近更新 更多