quarto-dev / quarto-dev/quarto-cli
Navigating errors when producing PDFs in ARM Linux containers
@cderv is already working on this.
Since Nov 22, 2023.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
I spent a few hours wrangling PDF issues on linux-arm64 (Docker devcontainer on macOS). Ultimately, I did get it to work, and here's what I found.
- The
quarto install tinytexplatform error does not provide any direction other than installing manually. A link to https://yihui.org/tinytex/#installation would be helpful here. - Freshly installed, quarto needs to retrieve multiple packages on first run, and that retrieval fails more often than not (up to six retries needed in my experience). Those error messages about database versions aren't all that helpful, when retrying repeatedly is the fix.
- For automation, it seems better to use Texlive from package repositories, because it very consistently works and avoids the
tlmgrupdates that cause the problem above. However, be aware of the issue below.
From #909:
xelatex is indeed the default (but also I believe comes with all versions of tinytex and all downloads of texlive so isn't normally something that should require dynamic download).
This is not the case for Debian packages, and a lot of containers are Debian images. When using a Debian Texlive install, quarto produces a badly misleading error about updating Texlive, which ends up being wasted time, because xelatex missing is the real problem.
This works on Debian:
sudo apt-get update
sudo apt-get install texlive texlive-xetex
Suggestions:
- (Workaround) Add the install link to the platform error.
- (Workaround) It's probably more of a Tinytex issue, but handle retries for package installation to overcome the unreliability.
- (Best fix) Package Tinytex for arm64. https://github.com/rstudio/tinytex-releases/issues/37
- (Also) Handle the case of missing
xelatexbetter, particularly by not suggesting Texlive upgrades in cases where it's not the problem.
### Tasks
- [ ] https://github.com/quarto-dev/quarto-cli/issues/7681
- [x] Add the install link to the platform error.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.