quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.98k stars 328 forks source link

Quarto trying to update tlmgr fails #1659

Open hebertodelrio opened 2 years ago

hebertodelrio commented 2 years ago

Bug description

THIS MIGHT BE RELATED TO ISSUE: https://github.com/quarto-dev/quarto-cli/issues/909#issue-1238560733

When attempting to preview or render a QMD file with a PDF format output, quarto attempts to update packages in TeX Live and fails to do it. The following is a minimal example that gives the error

I have checked with RStudio and I receive the same error (with a different QMD file of course). This is a bug on quarto

---
title: TLMGR Problems
format: pdf
---

**Hello World!**

```{python}
d="Hello World!"
```
% quarto preview minimaltest.qmd 

Starting python3 kernel...Done

Executing 'minimaltest.ipynb'
  Cell 1/1...Done

pandoc 
  to: latex
  output-file: minimaltest.tex
  standalone: true
  pdf-engine: xelatex
  variables:
    graphics: true
    tables: true
  default-image-extension: pdf

metadata
  documentclass: scrartcl
  classoption:
    - DIV=11
    - numbers=noendperiod
  papersize: letter
  header-includes:
    - '\KOMAoption{captions}{tableheading}'
  block-headings: true
  title: TLMGR Problems

running xelatex - 1
  This is XeTeX, Version 3.141592653-2.6-0.999994 (TeX Live 2022) (preloaded format=xelatex)
   restricted \write18 enabled.
  entering extended mode

updating tlmgr

updating existing packages

compilation failed- missing packages (automatic installation failed)

This behavior does not show up when the output is changed from PDF to HTML

quarto preview minimaltest.qmd

Starting python3 kernel...Done

Executing 'minimaltest.ipynb'
  Cell 1/1...Done

pandoc 
  to: html
  output-file: minimaltest.html
  standalone: true
  section-divs: true
  html-math-method: mathjax
  wrap: none
  default-image-extension: png

metadata
  document-css: false
  link-citations: true
  date-format: long
  lang: en
  title: TLMGR Problems

Output created: minimaltest.html

Watching files for changes
Browse at http://localhost:4853/

My setup is as following:

OS: OS X 11.6.8 account: user has sudo privileges (but it is not the admin) quarto: 1.0.37 conda: 4.13.0 python: 3.10.5 Julia: 1.7.3 jupyter:

nbconvert:

tlmgr:

tlmgr has been updated by using the utility provided by MacTeX 2022: TeX Live Utility.app, all packages has been updated.

The same behavior appear is instead of having the full MacTeX 2022 distribution (TeX Live) I have the tinyTeX.

Quarto has been installed locally and globally and in both cases the result is the same

To preview I have attempted to prepend the command with sudo but the result is the same. All of these has been run in a terminal. Finally I am attaching the output run with the --verbose option

(quarto) heberto@kepler quarto % quarto preview minimaltest.qmd --verbose

Starting python3 kernel...Done

Executing 'minimaltest.ipynb'
  Cell 1/1...Done

pandoc --verbose
  to: latex
  output-file: minimaltest.tex
  standalone: true
  pdf-engine: xelatex
  variables:
    graphics: true
    tables: true
  default-image-extension: pdf

metadata
  documentclass: scrartcl
  classoption:
    - DIV=11
    - numbers=noendperiod
  papersize: letter
  header-includes:
    - '\KOMAoption{captions}{tableheading}'
  block-headings: true
  title: TLMGR Problems

[INFO] Loaded /var/folders/jm/ljt12vhj31ggqg5dmbfvk6lh0000gn/T/quarto-session373afdca/40df8cf6/e9f0efca/template.patched from /var/folders/jm/ljt12vhj31ggqg5dmbfvk6lh0000gn/T/quarto-session373afdca/40df8cf6/e9f0efca/template.patched
[INFO] Loaded /var/folders/jm/ljt12vhj31ggqg5dmbfvk6lh0000gn/T/quarto-session373afdca/40df8cf6/e9f0efca/doc-class.tex from /var/folders/jm/ljt12vhj31ggqg5dmbfvk6lh0000gn/T/quarto-session373afdca/40df8cf6/e9f0efca/doc-class.tex
[INFO] Loaded /var/folders/jm/ljt12vhj31ggqg5dmbfvk6lh0000gn/T/quarto-session373afdca/40df8cf6/e9f0efca/pandoc.tex from /var/folders/jm/ljt12vhj31ggqg5dmbfvk6lh0000gn/T/quarto-session373afdca/40df8cf6/e9f0efca/pandoc.tex
[INFO] Loaded /var/folders/jm/ljt12vhj31ggqg5dmbfvk6lh0000gn/T/quarto-session373afdca/40df8cf6/e9f0efca/tightlist.tex from /var/folders/jm/ljt12vhj31ggqg5dmbfvk6lh0000gn/T/quarto-session373afdca/40df8cf6/e9f0efca/tightlist.tex
[INFO] Loaded /var/folders/jm/ljt12vhj31ggqg5dmbfvk6lh0000gn/T/quarto-session373afdca/40df8cf6/e9f0efca/tables.tex from /var/folders/jm/ljt12vhj31ggqg5dmbfvk6lh0000gn/T/quarto-session373afdca/40df8cf6/e9f0efca/tables.tex
[INFO] Loaded /var/folders/jm/ljt12vhj31ggqg5dmbfvk6lh0000gn/T/quarto-session373afdca/40df8cf6/e9f0efca/graphics.tex from /var/folders/jm/ljt12vhj31ggqg5dmbfvk6lh0000gn/T/quarto-session373afdca/40df8cf6/e9f0efca/graphics.tex
[INFO] Loaded /var/folders/jm/ljt12vhj31ggqg5dmbfvk6lh0000gn/T/quarto-session373afdca/40df8cf6/e9f0efca/citations.tex from /var/folders/jm/ljt12vhj31ggqg5dmbfvk6lh0000gn/T/quarto-session373afdca/40df8cf6/e9f0efca/citations.tex
[INFO] Loaded /var/folders/jm/ljt12vhj31ggqg5dmbfvk6lh0000gn/T/quarto-session373afdca/40df8cf6/e9f0efca/title.tex from /var/folders/jm/ljt12vhj31ggqg5dmbfvk6lh0000gn/T/quarto-session373afdca/40df8cf6/e9f0efca/title.tex
[INFO] Loaded /var/folders/jm/ljt12vhj31ggqg5dmbfvk6lh0000gn/T/quarto-session373afdca/40df8cf6/e9f0efca/before-body.tex from /var/folders/jm/ljt12vhj31ggqg5dmbfvk6lh0000gn/T/quarto-session373afdca/40df8cf6/e9f0efca/before-body.tex
[INFO] Loaded /var/folders/jm/ljt12vhj31ggqg5dmbfvk6lh0000gn/T/quarto-session373afdca/40df8cf6/e9f0efca/toc.tex from /var/folders/jm/ljt12vhj31ggqg5dmbfvk6lh0000gn/T/quarto-session373afdca/40df8cf6/e9f0efca/toc.tex
[INFO] Loaded /var/folders/jm/ljt12vhj31ggqg5dmbfvk6lh0000gn/T/quarto-session373afdca/40df8cf6/e9f0efca/before-bib.tex from /var/folders/jm/ljt12vhj31ggqg5dmbfvk6lh0000gn/T/quarto-session373afdca/40df8cf6/e9f0efca/before-bib.tex
[INFO] Loaded /var/folders/jm/ljt12vhj31ggqg5dmbfvk6lh0000gn/T/quarto-session373afdca/40df8cf6/e9f0efca/biblio.tex from /var/folders/jm/ljt12vhj31ggqg5dmbfvk6lh0000gn/T/quarto-session373afdca/40df8cf6/e9f0efca/biblio.tex
[INFO] Loaded /var/folders/jm/ljt12vhj31ggqg5dmbfvk6lh0000gn/T/quarto-session373afdca/40df8cf6/e9f0efca/after-body.tex from /var/folders/jm/ljt12vhj31ggqg5dmbfvk6lh0000gn/T/quarto-session373afdca/40df8cf6/e9f0efca/after-body.tex
[INFO] Running filter /Users/heberto/Applications/quarto/share/filters/quarto-init/quarto-init.lua
[INFO] Completed filter /Users/heberto/Applications/quarto/share/filters/quarto-init/quarto-init.lua in 9 ms
[INFO] Running filter /Users/heberto/Applications/quarto/share/filters/authors/authors.lua
[INFO] Completed filter /Users/heberto/Applications/quarto/share/filters/authors/authors.lua in 9 ms
[INFO] Running filter /Users/heberto/Applications/quarto/share/filters/quarto-pre/quarto-pre.lua
[INFO] Completed filter /Users/heberto/Applications/quarto/share/filters/quarto-pre/quarto-pre.lua in 12 ms
[INFO] Running filter /Users/heberto/Applications/quarto/share/filters/crossref/crossref.lua
[INFO] Completed filter /Users/heberto/Applications/quarto/share/filters/crossref/crossref.lua in 9 ms
[INFO] Running filter /Users/heberto/Applications/quarto/share/filters/layout/layout.lua
[INFO] Completed filter /Users/heberto/Applications/quarto/share/filters/layout/layout.lua in 25 ms
[INFO] Running filter /Users/heberto/Applications/quarto/share/filters/quarto-post/quarto-post.lua
[INFO] Completed filter /Users/heberto/Applications/quarto/share/filters/quarto-post/quarto-post.lua in 9 ms
[INFO] Running filter /Users/heberto/Applications/quarto/share/filters/quarto-finalize/quarto-finalize.lua
[INFO] Completed filter /Users/heberto/Applications/quarto/share/filters/quarto-finalize/quarto-finalize.lua in 7 ms
running xelatex - 1
  This is XeTeX, Version 3.141592653-2.6-0.999994 (TeX Live 2022) (preloaded format=xelatex)
   restricted \write18 enabled.
  entering extended mode

updating tlmgr

updating existing packages

compilation failed- missing packages (automatic installation failed)

quarto check Output


[✓] Checking Quarto installation......OK
      Version: 1.0.37
      Path: /Users/heberto/Applications/quarto/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.10.5 (Conda)
      Path: /Users/heberto/opt/miniconda3/envs/quarto/bin/python
      Jupyter: 4.11.1
      Kernels: julia-1.7, python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
      Version: 4.2.0
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Library/Frameworks/R.framework/Versions/4.2/Resources/library
      rmarkdown: 2.14

[✓] Checking Knitr engine render......OK

quarto tools check Output

Tool         Status            Installed     Latest  
chromium     Not installed     ---           869685  
tinytex      Not installed     ---           v2022.08

Checklist

dragonstyle commented 2 years ago

Sorry that you've run into this!

When this happens, is there a minimaltest.log file created? We attempt to inspect that log file to determine what the issue is, but in this case either we didn't find that file or we failed to infer an underlying error. If that is present, getting a look at the contents would be instructive, I think.

hebertodelrio commented 2 years ago

I do understand but there is no log file produced. I am opening issues as I encounter them. I wish there was a way to request from quarto to produce output as it moves from one stage to another in the process to get the desired output, but there is none.

That would allow to determine where is the error happening.

dragonstyle commented 2 years ago

Hmm... That simple document produces a PDF for myself when run locally. It is most likely related to the TeX configuration on your local machine and our behavior in that environment / configuration. A couple more questions:

dragonstyle commented 2 years ago

We've done pretty extensive work around our TinyTex installation (including preferring it when installed, and not having it mess with the system environment by default). Can you give this a try with a pre-release version https://quarto.org/docs/download/prerelease.html?