All of a sudden, compilation of pdf files from my knitr/markdown *.Rmd files are now failing with the obtuse error message:
tlmgr search --file --global "/xcolor.sty"
tlmgr.pl: Remote repository is newer than local (2018 < 2019)
Cross release updates are only supported with
update-tlmgr-latest(.sh/.exe) --update
Please see Upgrade - TeX Live - TeX Users Group for details.
! LaTeX Error: File `xcolor.sty' not found.
! Emergency stop.
The compliation of the knitr/markdown file into latex works fine. It is the tinytex compilation of the knit.md file into a pdf file that is failing. knitr and tinytex are both up-to-date.
This is sort of urgent. How can I fix this? Thanks for any help. Larry Hunsicker
I just reinstalled tinytex. It didn't fix the problem. So I deleted tinytex and then reinstalled it. Same error. I still can't get a working pdf from my .Rmd files. Larry
Addendum: I just duplicated this problem on a different Windows 10 machine. Same result. But the standard .Rmd stub worked fine on my ubuntu box. This seems to be a problem with the compiled Windows 10 version of tinytex. Where am I supposed to find "newer than local," and what am I supposed to do there?
It seems that I last updated tinytex on 9 Dec 2019 (today) on my Ubuntu as well as my two Windows 10 machines. This is the first time that I tried to use it today. Is it possible to downgrade to the prior version? Larry
OK. I got the problem fixed. The suggestion from cderv above is corrrect but a bit incomplete. Simply reinstalling the tinytex package with install.packages() doesn't fix the problem. Evidently what is required is to reinstall the entire TexLive that is called by tinytex. That is done by entering in your R console the following command:
tinytex::reinstall_tinytex()
This evidently reinstalls TexLive (not just the tinytex package). It will take a few moments to complete. Then shut down R and reopen it and repeat knitting your Rmd file. This may take quite a few minutes to complete, as TexLive may have to reinstall a whole series of Latex packages (not R packages). But it eventually completed and produced a correct pdf file for me. Once this first call to tinytex completed, all the subsequent calls went lickety-split as usual.
Larry Hunsicker
When I said reinstall TinyTex, with those uppercase letters, I meant the distribution not the package tinytext, all lowercase. I did not mentioned install.packages() in my answer. The link to the FAQ explained it well in point 11 and I did not copied from it thinking linking was enough - sorry it was not clear for you.