I am brand new to using Rmarkdown and I am trying to knit to a PDF (I would actually prefer a Word document but I'm using kableExtra and every time I knit to a .docx the tables completely fall apart, but that's another problem altogether).
Whenever I try to knit to a PDF I get this error (this is with options(tinytex.verbose=TRUE)
):
This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
tlmgr search --file --global "/multirow.sty"
C:\Users\robyn\AppData\Roaming\TinyTeX\texmf-dist\scripts\texlive\tlmgr.pl: TLPDB::from_file could not get texlive.tlpdb from: https://mirror.ctan.org/systems/texlive/tlnet/tlpkg/texlive.tlpdb
Maybe the repository setting should be changed.
More info: https://tug.org/texlive/acquire.html
! LaTeX Error: File `multirow.sty' not found.
! Emergency stop.
<read *>
Error: LaTeX failed to compile Request_0006.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Request_0006.log for more info.
Execution halted
No LaTeX installation detected (LaTeX is required to create PDF output). You should install a LaTeX distribution for your platform: https://www.latex-project.org/get/
If you are not sure, you may install TinyTeX in R: tinytex::install_tinytex()
Otherwise consider MiKTeX on Windows - http://miktex.org
MacTeX on macOS - https://tug.org/mactex/
(NOTE: Download with Safari rather than Chrome _strongly_ recommended)
Linux: Use system package manager
I am aware that several people had this issue in the last several years, and I have tried all the solutions suggested on any forums with this same question to no avail. More information below:
I am running on Windows 11 Enterprise version 23H2.
TLDR of things I've tried:
tinytex::install_tinytex()
tinytex::reinstall_tinytex()
tinytex::tlmgr_install('multirow')
- Downloading multirow.zip with Rtools
update.packages(ask = FALSE, checkBuilt = TRUE)
andtinytex::tlmgr_update()
tinytex::parse_install()
- Changing the mirror
Longer version of things I've tried:
I downloaded TinyTeX directly in R using tinytex::install_tinytex()
two days ago. Today I tried tinytex::reinstall_tinytex()
and subsequently tinytex::install_tinytex()
again, still nothing. I cannot download/install MiKTex because I am on a company-managed computer (the website won't even load, suggesting that it's blocked entirely from my company), so I am pretty much stuck with TinyTeX.
A thread I found suggested running this: tinytex::tlmgr_install('multirow')
so I ran that and this was the output:
tlmgr install multirow
C:\Users\robyn\AppData\Roaming\TinyTeX\texmf-dist\scripts\texlive\tlmgr.pl: TLPDB::from_file could not get texlive.tlpdb from: https://mirror.ctan.org/systems/texlive/tlnet/tlpkg/texlive.tlpdb
Maybe the repository setting should be changed.
More info: https://tug.org/texlive/acquire.html
tlmgr install multirow
C:\Users\robyn\AppData\Roaming\TinyTeX\texmf-dist\scripts\texlive\tlmgr.pl: TLPDB::from_file could not get texlive.tlpdb from: https://mirror.ctan.org/systems/texlive/tlnet/tlpkg/texlive.tlpdb
Maybe the repository setting should be changed.
More info: https://tug.org/texlive/acquire.html
Another suggestion on that thread was downloading Rtools then running this: install.packages("http://mirrors.ctan.org/macros/latex/contrib/multirow.zip")
so I did that and I got this error:
inferring 'repos = NULL' from 'pkgs'
trying URL 'http://mirrors.ctan.org/macros/latex/contrib/multirow.zip'
Warning in install.packages :
URL 'http://mirrors.ctan.org/macros/latex/contrib/multirow.zip': status was 'Failure when receiving data from the peer'
Error in download.file(p, destfile, method, mode = "wb", ...) :
cannot open URL 'http://mirrors.ctan.org/macros/latex/contrib/multirow.zip'
I tried updating everything with this:
update.packages(ask = FALSE, checkBuilt = TRUE)
tinytex::tlmgr_update()
and still no change.
I tried using tinytex::parse_install()
with my log to install missing packages, and got this warning:
tlmgr search --file --global "/multirow.sty"
Warning in parse_packages(...) :
Failed to find a package that contains multirow.sty
I downloaded the TinyTeX-1.zip file from GitHub but I know nothing about using the command window or batching, so I couldn't really get any further with that.
I tried changing the mirror
> tinytex::tlmgr(
+ c('option', 'repository', 'http://ctan.math.washington.edu/tex-archive/systems/texlive/tlnet')
+ )
tlmgr option repository http://ctan.math.washington.edu/tex-archive/systems/texlive/tlnet
tlmgr.pl: setting default package repository to http://ctan.math.washington.edu/tex-archive/systems/texlive/tlnet
tlmgr.pl: updating C:/Users/robyn/AppData/Roaming/TinyTeX/tlpkg/texlive.tlpdb
with the same result.
I'm at the end of my rope here -- does anyone know how to fix this in 2025???