Home > Blockchain >  TinyTex errors within RMarkdown (Local TeX Live (2021) is older than remote repository (2022))
TinyTex errors within RMarkdown (Local TeX Live (2021) is older than remote repository (2022))

Time:04-05

I randomly started getting the error messages below while trying to run a RMarkdown document. I am on a Windows, so I deleted the TinyTex subfolder within the AppData folder and reran tinytex::install_tinytex(). That installed but didn't fix the error messages, so I tried tinytex::reinstall_tinytex() but that didn't help.

I know from the error messages I am missing LaTeX packages, so I tried running the code below but it will not run. I assume there is a greater problem at hand, and guidance would be greatly appreciated.

tinytex::parse_install(text = "! LaTeX Error: File `setspace.sty' not found.")

Error messages:

A new version of TeX Live has been released. If you need to install or update any LaTeX packages, you have to upgrade TinyTeX with tinytex::reinstall_tinytex(). If it fails to upgrade, you might be using a default random CTAN mirror that has not been fully synced to the main CTAN repository, and you need to wait for a few more days or use a CTAN mirror that is known to be up-to-date (see the "repository" argument on the help page ?tinytex::install_tinytex).

tlmgr.pl: Local TeX Live (2021) 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. ! LaTeX Error: File `setspace.sty' not found.

! Emergency stop. <read *>

Error: LaTeX failed to compile markdown.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See markdown.log for more info. Execution halted

CodePudding user response:

Two possibilities:

  1. set your mirror to the historic version which still has 2021, e.g.

    tinytex::tlmgr("option repository https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/2021/tlnet-final")
    
  2. install vanilla texlive2022 from https://tug.org/texlive/

(I'd go with the second solution. If you use a complete texlive installation instead of tinytex, you'll never again have to deal with missing packages)

CodePudding user response:

I also began encountering this error today, and cannot update to 2022 using normal means. The recommended approach of tinytex::reinstall_tinytex() did not seem to do anything, which makes me wonder if others are encountering a sudden inability to knit using tinytex today.

The recommendation of setting my mirror to a historic version allowed me to knit but I would hope that I could continue using an updated version of tex live via tinytext without having to download the entire installation.

  • Related