我想使用Quarto
创建一个pdf文档。当我运行下面的简单代码时,它返回以下错误:
---
title: "Test"
format: pdf
---
Example document
输出错误:
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.
我不明白为什么会发生这个错误。我试着像here那样使用tinytex::install_tinytex()
,但是安装后错误仍然存在。我还更新了tlmgr,它看起来像here那样工作:
> tinytex::tlmgr_update()
tlmgr update --all --self
我还尝试了tinytex::reinstall_tinytex()
,如下所示:
> 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
但是错误仍然存在。所以我想知道是否有人知道如何修复这个错误?
请注意:我目前使用的是Linux。
1条答案
按热度按时间wrrgggsh1#
对我来说,通过终端会话(如here所述)在Ubuntu上安装Tex Live可能会修复这个问题。首先,您应该更新运行以下命令的apt包:
要安装Tex Live,您应该运行以下命令:
安装后,在Rstudio控制台中运行
tinytex::install_tinytex()
,错误应该消失了。我还确保我已经像描述的here那样在我的机器上安装了夸托。