Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing texlive packages fails after TeXLive 2021 release #293

Closed
jeroen opened this issue Apr 2, 2021 · 24 comments
Closed

Installing texlive packages fails after TeXLive 2021 release #293

jeroen opened this issue Apr 2, 2021 · 24 comments

Comments

@jeroen
Copy link

jeroen commented Apr 2, 2021

This was working yesterday, but now it fails. I think TeXLive 2021 was released today?

> tinytex::install_tinytex() #OK 
> tinytex::tlmgr_install('a4wide')
tlmgr install a4wide

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

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

@maelle

@maelle
Copy link

maelle commented Apr 2, 2021

Rather minimal example https://github.com/maelle/pdf-bookdown Compared to the starter book I added

  • A GHA workflow using pak, that builds the PDF book, and a DESCRIPTION file to go with this.
  • One package in preamble.tex that's not packaged in tinytex as far as I understand.

Failure https://github.com/maelle/pdf-bookdown/runs/2252801821?check_suite_focus=true

@maelle
Copy link

maelle commented Apr 2, 2021

I noticed a similar failures in repos of mine whose GHA workflows used to work.

@cderv
Copy link
Contributor

cderv commented Apr 2, 2021

yes indeed. Thanks for the heads up on this !

TeXLive 2021 was release yesterday - it every 1st April I think. We don't have a TinyTeX prebuilt binary available for this version yet, and tinytex::install_tinytex() download the last prebuilt version of tinytex-release.

@yihui it seems the release date is 1st april each year (it is already announced 1st April for TexLive 2022) . Maybe we could schedule a build of TinyTeX release each year on the 2nd in addition to our monthly build ?

I believe we could have a build today - I let @yihui trigger one in https://github.com/yihui/tinytex-releases as he knows the infrastructure better.

It seems it could be possible to also make a function to update a current tlmgr install in this case using update-tlmgr-latest(.sh/.exe) --update, but the advice from TeX Live remains a clean new install https://www.tug.org/texlive/tlmgr.html

@yihui
Copy link
Member

yihui commented Apr 2, 2021

Yes, this happens yearly, but the date may not be the same every year. I do check this problem in tinytex::tlmgr_update() and suggest tinytex::reinstall_tinytex() in the message:

https://github.com/yihui/tinytex/blob/ab46c449edda4e1a3a49cdc3b239e454424703c4/R/tlmgr.R#L192
https://github.com/yihui/tinytex/blob/ab46c449edda4e1a3a49cdc3b239e454424703c4/R/tlmgr.R#L198-L216

I don't know why it didn't work in @jeroen's case.

In @maelle's case, which is an automated job, I need to think more about what to do, since the message won't be seen by a human until the error occurs.

The most complicated thing is the CTAN mirrors---tlmgr chooses a random (fastest) mirror each time, so you could have installed TeX Live 2021 successfully with install_tinytex(), but tlmgr_install() could install packages from another CTAN mirror that still has TeX Live 2020. Anyway, I'll look into these problems, although (a couple of days') time will cure them all.

@jeroen
Copy link
Author

jeroen commented Apr 2, 2021

The most complicated thing is the CTAN mirrors---tlmgr chooses a random (fastest) mirror each time, so you could have installed TeX Live 2021 successfully with install_tinytex(), but tlmgr_install() could install packages from another CRAN mirror that still has TeX Live 2020. Anyway, I'll look into these problems, although (a couple of days') time will cure them all.

I don't understand. It was my impression that the bundle that gets installed with install_tinytex() contains a build from https://github.com/yihui/tinytex-releases/releases, which currently has TeXLive 2020, and does not need texlive mirrors?

I always set a CTAN mirror in my CI that I know to be reliable, but it is not clear to me how this could work now the mirror has texlive 2021, but the tinytex bundles still have texlive 2020?

yihui added a commit that referenced this issue Apr 2, 2021
…/tlnet (#293)

this should stabilize TinyTeX for macOS and Linux; I haven't supported the env var CTAN_REPO for Windows yet
@yihui
Copy link
Member

yihui commented Apr 5, 2021

I don't understand. It was my impression that the bundle that gets installed with install_tinytex() contains a build from https://github.com/yihui/tinytex-releases/releases, which currently has TeXLive 2020, and does not need texlive mirrors?

By default, the bundle is not from tinytex-releases, but a daily build of TinyTeX. The tinytex-releases repo contains monthly releases of TinyTeX.

I always set a CTAN mirror in my CI that I know to be reliable

Setting a fixed CTAN mirror at the time of packaging TinyTeX can make sure that we can always successfully build the TinyTeX package (on the daily basis), so I have done that. Previously, the daily build could fail because of the random mirrors, and that's exactly what happened this time.

but it is not clear to me how this could work now the mirror has texlive 2021, but the tinytex bundles still have texlive 2020?

Basically, it was too late for you to set the mirror. I have to do that when running the installation script install-tl. Otherwise TinyTeX could be packaged with one mirror, but you switched to another mirror after TinyTeX is installed. My mirror could be older than yours, and then tlmgr won't be able to update or install packages.

For the record, I'm setting the illiniois.edu mirror (the same as your choice).

Anyway, as I said, this problem should disappear in one day or two (or sometimes a couple of hours). If only we had a CTAN mirror that is guaranteed to have the latest version of TeX Live as soon as a new version is released, we wouldn't run into this problem.

@jeroen
Copy link
Author

jeroen commented Apr 6, 2021

This problem seems indeed solved with the latest daily builds of tinytex.

Anyway, as I said, this problem should disappear in one day or two (or sometimes a couple of hours). If only we had a CTAN mirror that is guaranteed to have the latest version of TeX Live as soon as a new version is released, we wouldn't run into this problem.

Maybe not entirely. In practice there may be time in between when tinytex is installed, and when the latex file is rendered.

In the case of r-universe, we install tinytex our docker image to build R packages. The docker image is only updated once in a while, hence the tinytex installation in there may be several weeks/months old.

I guess I need to remember to rebuild this docker image every time a new version of texlive is released.

@danielludolf
Copy link

danielludolf commented Apr 4, 2022

I started getting the error message below when knitting a markdown file today. I ran tinytex::reinstall_tinytex(), but it didn't resolve the errors. Was a final solution for this issue found last year?

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).

TeX Live 2021 is frozen and will no longer be routinely updated. This happens when a new release is made, or will be made shortly.

If you're willing to help with pretesting a new release, and we hope you are, please see https://tug.org/texlive/pretest.html.

For general status information about TeX Live, see its home page: https://tug.org/texlive

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.

@cderv
Copy link
Contributor

cderv commented Apr 4, 2022

Public release for TeX Live 2022 was out yesterday. Unfortunately, like each year there is 1 to 2 day delay for new version to be available as mirrors will sync.

dragonstyle added a commit to quarto-dev/quarto-cli that referenced this issue Apr 4, 2022
@yihui
Copy link
Member

yihui commented Apr 4, 2022

@danielludolf tinytex::reinstall_tinytex() should work now. I have built the new daily version of TinyTeX based on TeX Live 2022, which was released in less than 24 hours ago.

We will see what we could do to reduce the breakage time. Unfortunately we can't completely fix this problem because we don't have any control on when CTAN mirrors update themselves after a new TeX Live release appears each year (usually in the beginning of April).

@cderv
Copy link
Contributor

cderv commented Apr 4, 2022

Maybe looking at https://ctan.org/mirrors/mirmon could help find a recent enough mirror.
I can confirm that the new build is working with a recent CTAN mirror on my side.

@danielludolf
Copy link

@yihui tinytex::reinstall_tinytex() works on my end now as well. Thank you @yihui @cderv

@jdzm
Copy link

jdzm commented Apr 13, 2022

Hi @yihui, thanks for the solutions posted so far.

I encountered the same issue recently and I was wondering if there is any way of pointing the tlmgr download to a frozen repository so that it is not updated with the daily build of tinytex?

In my case, I cannot update tinytex very often (as of now I install the package with conda r-tinytex=0.35=r41hc72bb7e_0 and then using tinytex::install_tinytex(version = "2021.11")). Do you know if there is anything I can do to have a more 'static' version installed? If not, do you think it is risky to let the tinytex version to fetch the daily build while keeping the older R package installed through conda?

Thanks for your time!

@yihui
Copy link
Member

yihui commented Apr 14, 2022

I was wondering if there is any way of pointing the tlmgr download to a frozen repository so that it is not updated with the daily build of tinytex?

If you install the 2021.11 version of TinyTeX, you can probably freeze the TeX Live repository with

tinytex::tlmgr_repo('https://texlive.info/tlnet-archive/2021/11/30/tlnet/')

I haven't tried that before, and I'm not sure which date would be the best (I'm using Nov 30th as an example here). You can find all possible dates here: https://texlive.info/tlnet-archive/

In my case, I cannot update tinytex very often (as of now I install the package with conda r-tinytex=0.35=r41hc72bb7e_0

Updating the R package tinytex on a regular basis shouldn't be necessary. It's fairly stable and I think you can almost treat it as feature-complete.

do you think it is risky to let the tinytex version to fetch the daily build while keeping the older R package installed through conda?

The R package shouldn't be a problem. I guess TinyTeX (the LaTeX distribution) is more likely to be the problem. I can't really tell you how likely, though. LaTeX is quite stable overall, but that doesn't mean the latest daily build is guaranteed to always work for your older projects. If you really desire for stability, I think you can just freeze TinyTeX using the method I mentioned above.

yihui added a commit that referenced this issue Apr 14, 2022
…stall TinyTeX from the main CTAN repo, which should have the very latest version of TeX Live (this may help a little bit with #293)
@pdbailey0
Copy link

I got this error from CRAN after submitting a package today. Given the "one day or two" comment I wonder if this is expected behavior.

@yihui
Copy link
Member

yihui commented Apr 17, 2022

@pdbailey0 That's too little information for me to help (the full log will be more helpful). My guess is that CRAN's machines are probably using an older version of TeX Live. For TinyTeX users, all they need to do is tinytex::reinstall_tinytex() (we have long passed "one day or two"). I have no idea how CRAN installs LaTeX, but it's not your fault if their version is old, so you are probably fine.

@0xJchen
Copy link

0xJchen commented Apr 26, 2022

I was wondering if there is any way of pointing the tlmgr download to a frozen repository so that it is not updated with the daily build of tinytex?

If you install the 2021.11 version of TinyTeX, you can probably freeze the TeX Live repository with

tinytex::tlmgr_repo('https://texlive.info/tlnet-archive/2021/11/30/tlnet/')

I haven't tried that before, and I'm not sure which date would be the best (I'm using Nov 30th as an example here). You can find all possible dates here: https://texlive.info/tlnet-archive/

In my case, I cannot update tinytex very often (as of now I install the package with conda r-tinytex=0.35=r41hc72bb7e_0

Updating the R package tinytex on a regular basis shouldn't be necessary. It's fairly stable and I think you can almost treat it as feature-complete.

do you think it is risky to let the tinytex version to fetch the daily build while keeping the older R package installed through conda?

The R package shouldn't be a problem. I guess TinyTeX (the LaTeX distribution) is more likely to be the problem. I can't really tell you how likely, though. LaTeX is quite stable overall, but that doesn't mean the latest daily build is guaranteed to always work for your older projects. If you really desire for stability, I think you can just freeze TinyTeX using the method I mentioned above.

Sir, I followed the latest version this repo but still getting the tlmgr: Local TeX Live (2021) is older than remote repository (2022). in the docker.

I see that tinytex::tlmgr_repo('https://texlive.info/tlnet-archive/2021/11/30/tlnet/') might help. I wonder how can I type in this command? I directly run it in the docker shell but it seems not to be a valid command. Could you please give me some hints?

@cderv
Copy link
Contributor

cderv commented Apr 27, 2022

still getting the tlmgr: Local TeX Live (2021) is older than remote repository (2022). in the docker.

Which dockerfile are you using ? Is using a newer version of TinyTeX or TeX Live something possible ? Currently it seems to be using an older version, which is no more suited with the repo.

I see that tinytex::tlmgr_repo('https://texlive.info/tlnet-archive/2021/11/30/tlnet/') might help.

This could help connect to an older repo. This is necessary if you can't update your TinyTeX installation. This is a R command so you need to type that in R or put it in a Rprofile for example.
If you prefer to use command line in terminal, you can try

tlmgr options repository 'https://texlive.info/tlnet-archive/2021/11/30/tlnet/'

if tlmgr is correctly put in PATH.

I would suggest to update TinyTeX in your docker environment though.

@0xJchen
Copy link

0xJchen commented Apr 27, 2022

still getting the tlmgr: Local TeX Live (2021) is older than remote repository (2022). in the docker.

Which dockerfile are you using ? Is using a newer version of TinyTeX or TeX Live something possible ? Currently it seems to be using an older version, which is no more suited with the repo.

I see that tinytex::tlmgr_repo('https://texlive.info/tlnet-archive/2021/11/30/tlnet/') might help.

This could help connect to an older repo. This is necessary if you can't update your TinyTeX installation. This is a R command so you need to type that in R or put it in a Rprofile for example. If you prefer to use command line in terminal, you can try

tlmgr options repository 'https://texlive.info/tlnet-archive/2021/11/30/tlnet/'

if tlmgr is correctly put in PATH.

I would suggest to update TinyTeX in your docker environment though.

Thanks for the reply, Sir. I made it to upgrade the texlive version. The problem that the current texlive version in toolkit repo is still outdated (2021) and needs to be updated manually.

@cderv
Copy link
Contributor

cderv commented Apr 27, 2022

The problem that the current texlive version in toolkit repo is still outdated (2021) and needs to be updated manually.

See there FAQ item about that: https://github.com/overleaf/toolkit/blob/master/doc/ce-upgrading-texlive.md#determining-your-current-tex-live-version It says:

We usually release a new version of the Overleaf docker image shortly after a TeX Live release.

I guess they will do it.

But are you using tinytex in there ? Or is this a question about updating TeX Live ? I am not sure about the the R related question here.

@0xJchen
Copy link

0xJchen commented Apr 27, 2022

Sorry for the ambiguity. The official repo contains not full version of Tex live. Thus any attempt to install pkg with tlmgr will report Local TeX Live (2021) is older than remote repository (2022).

@cderv
Copy link
Contributor

cderv commented Apr 27, 2022

I don't understand what is the issue really. Overleaf repo contains a doc about this (https://github.com/overleaf/toolkit/blob/master/doc/ce-upgrading-texlive.md#determining-your-current-tex-live-version) linking to TeX Live page on how to use historic repo https://www.tug.org/texlive/acquire.html#past
You should follow this and configure correctly.

I still don't see how this is related with tinytex for which this github repository is about. And even if it is, you have the same solution using the R package above.

You just need to put this configuration in the right place depending of your project, your code language and what you are doing.

How do you expect us to help further ?

@0xJchen
Copy link

0xJchen commented Apr 27, 2022

Sorry about that. I am mentioning a problem of overleaf's official tex live configuration and it does not related to tinytex. It's the same error message that brought me here. Maybe I should report it to the overleaf devs instead of here. Wish you a nice day Sir.

@cderv
Copy link
Contributor

cderv commented Apr 27, 2022

It's the same error message that brought me here. Maybe I should report it to the overleaf devs instead of here. Wish you a nice day Sir.

I understand now. I assume it was related to R 📦 tinytex as this is the github repo for it.

You should definitely report to them to know when they will update their docker image or they improve their doc if it is not clear enought.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants