我使用烧瓶对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?
答案 0 :(得分:3)
不需要自定义buildpack - 您始终可以在heroku.yaml
指令内定义要在build - packages
上安装的包:
build:
packages:
- texlive-latex-base
- texlive-fonts-recommended
- texlive-fonts-extra
- texlive-latex-extra