rpdfquartoxelatextinytex

ERROR: Your TexLive version is not updated enough


I would like to create a pdf document using Quarto. When I run the following simple code it returns the following error:

---
title: "Test"
format: pdf
---

Example document

Output error:

running xelatex - 1
command xelatex not found, attempting install
finding package for xelatex
ERROR: Your TexLive version is not updated enough to connect to the remote repository and download packages. Please update your installation of TexLive or TinyTex.

Underlying message: Local TeX Live (2020) is older than remote repository (2022).
Cross release updates are only supported with
  update-tlmgr-latest(.sh/.exe) --update
See https://tug.org/texlive/upgrade.html for details.

I don't understand why this error is happening. I tried using tinytex::install_tinytex() like described here, but after installing the error stays the same. I also updated the tlmgr which seems to work like described here:

> tinytex::tlmgr_update()
tlmgr update --all --self

I also tried to tinytex::reinstall_tinytex() like this:

> tinytex::reinstall_tinytex()
If reinstallation fails, try install_tinytex() again. Then install the following packages:

tinytex::tlmgr_install(c("amscls", "amsfonts", "amsmath", "atbegshi", "atveryend", "auxhook", "babel", "bibtex", "bigintcalc", "bitset", "booktabs", "cm", "ctablestack", "dehyph", "dvipdfmx", "dvips", "ec", "epstopdf-pkg", "etex", "etexcmds", "etoolbox", "euenc", "everyshi", "fancyvrb", "filehook", "firstaid", "float", "fontspec", "framed", "geometry", "gettitlestring", "glyphlist", "graphics", "graphics-cfg", "graphics-def", "helvetic", "hycolor", "hyperref", "hyph-utf8", "hyphen-base", "iftex", "inconsolata", "infwarerr", "intcalc", "knuth-lib", "kpathsea", "kvdefinekeys", "kvoptions", "kvsetkeys", "l3backend", "l3kernel", "l3packages", "latex", "latex-amsmath-dev", "latex-bin", "latex-fonts", "latex-tools-dev", "latexconfig", "latexmk", "letltxmacro", "lm", "lm-math", "ltxcmds", "lua-alt-getopt", "lua-uni-algos", "luahbtex", "lualatex-math", "lualibs", "luaotfload", "luatex", "luatexbase", "mdwtools", "metafont", "mfware", "modes", "natbib", "pdfescape", "pdftex", "pdftexcmds", "plain", "psnfss", "refcount", "rerunfilecheck", "scheme-infraonly", "selnolig", "stringenc", "symbol", "tex", "tex-ini-files", "texlive-scripts", "texlive.infra", "times", "tipa", "tools", "unicode-data", "unicode-math", "uniquecounter", "url", "xcolor", "xetex", "xetexconfig", "xkeyval", "xunicode", "zapfding"))

The directory /home/quinten/.TinyTeX/texmf-local is not empty. It will be backed up to /tmp/Rtmp6FzD8d/file2890646844830b and restored later.

Found '/usr/bin/tlmgr', which indicates a LaTeX distribution may have existed in the system.
Continue the installation anyway? (Y/N) Y
tlmgr option sys_bin ~/bin
tlmgr: setting option sys_bin to /home/quinten/bin.
tlmgr: updating /home/quinten/.TinyTeX/tlpkg/texlive.tlpdb
tlmgr option repository 'https://mirrors.evoluso.com/CTAN/systems/texlive/tlnet'
tlmgr: setting default package repository to https://mirrors.evoluso.com/CTAN/systems/texlive/tlnet
tlmgr: updating /home/quinten/.TinyTeX/tlpkg/texlive.tlpdb
tlmgr update --list
tlmgr: package repository https://mirrors.evoluso.com/CTAN/systems/texlive/tlnet (verified)
update:   texlive-scripts    [112k]: local:    66415, source:    66467

But the errors is still there. So I was wondering if anyone knows how to fix this error?


Please note: I am currently using Linux.


Solution

  • For me, it was probably fixed by installing Tex Live on Ubuntu via a terminal session like described here. First, you should update the apt packages running this:

    sudo apt update
    

    To install Tex Live you should run the following:

    sudo apt install texlive-full -y
    

    After installing this, run tinytex::install_tinytex() in your Rstudio console and the error should be gone.

    I also made sure that I have installed Quarto on my machine like described here.