1

Github Actions have made it much easier to automatically regenerate a book or website with LaTeX graphics, but it seems to have problems with tlmgr, in that nothing I tried makes it actually work.

I'm installing TeX Live the usual way:

sudo apt-get update
sudo apt-get install xzdec libpoppler-glib-dev texlive texlive-xetex -y

And then I bootstrap tlmgr the usual way, too:

tlmgr --version
tlmgr init-usertree
sudo tlmgr update --all

This leads to the following output:

(running on Debian, switching to user mode!)
tlmgr revision 46207 (2018-01-04 19:34:36 +0100)
tlmgr using installation: /usr/share/texlive
TeX Live (http://tug.org/texlive) version 2017
(running on Debian, switching to user mode!)
Cannot determine type of tlpdb from /home/runner/texmf!
(running on Debian, switching to user mode!)
tlmgr: Remote repository is newer than local (2017 < 2020)
Cross release updates are only supported with
  update-tlmgr-latest(.sh/.exe) --update
Please see https://tug.org/texlive/upgrade.html for details.
##[error]Process completed with exit code 1.

Reading through https://tug.org/texlive/upgrade.html doesn't really offer much in a way forward here, since it describes some intensive manual intervention, which isn't an option for a CI/CD run. How do I make tlmgr/TeX Live play nice in this situation?

(And in case I'm thinking about this the wrong way, I need xelatex and pdfcrop for my CI task, and would love to do that without ever needing tlmgr. However, it looks like the only way to get pdfcrop installed is via texlive-full, which is nearly 5GB and so isn't an option as part of a CI runner)

  • 2
    Basically the tlmgr you get when you install TeX live from the Debian/Ubuntu repositories can not update system-installed packages. If you install TeX live via apt/apt-get you are basically stuck with the package version your Linux distribution ships. If you want to live on the cutting edge, you need to install a 'vanilla' TeX live from TUG.org (https://tex.stackexchange.com/q/1092/35864) – moewe Jun 27 '20 at 17:12
  • 1
    Here's how the LaTeX team use Travis CI (https://github.com/latex3/latex2e/blob/master/.travis.yml, https://github.com/latex3/latex2e/blob/master/support/texlive.sh, https://github.com/latex3/latex2e/blob/master/support/texlive.profile) to install a vanilla TeX live. (Slightly simpler setup is at https://github.com/josephwright/csquotes/blob/master/.travis.yml, https://github.com/josephwright/csquotes/blob/master/support/install-texlive.sh, https://github.com/josephwright/csquotes/blob/master/support/texlive.profile), but the idea is the same. – moewe Jun 27 '20 at 17:14
  • 1
    According to https://packages.debian.org/stretch/texlive-extra-utils pdfcrop is in texlive-extra-utils, which might save you from having to install texlive-full – moewe Jun 27 '20 at 17:18
  • That's a good find - I tried searching the debian package system and didn't get anything useful: how did you find that? – Mike 'Pomax' Kamermans Jun 27 '20 at 17:19
  • I searched "pdfcrop ubuntu", found https://askubuntu.com/q/864474/57634, then Googled texlive-extra-utils. I guess a more direct method would have been to search on packages.debian.org https://packages.debian.org/search?suite=default§ion=all&arch=any&searchon=contents&keywords=pdfcrop (you need to search "package contents" or "descriptions", the other options don't turn up anything for pdfcrop) – moewe Jun 27 '20 at 17:22
  • The heck? That's literally what I did 20 minutes ago and got an empty list... =_= Want to make that an answer? Because that's the simplest solution and definitely works. – Mike 'Pomax' Kamermans Jun 27 '20 at 17:23

1 Answers1

2

Since you are only after tlmgr usage for pdfcrop you can just install texlive-extra-utils instead.

Often one can find TeX live packages/component by searching on packages.debian.org. Just make sure to select "package contents" or "descriptions".

e.g. https://packages.debian.org/search?suite=default&section=all&arch=any&searchon=contents&keywords=pdfcrop

Searching "package names" is usually not enough.


As mentioned in the comments the tlmgr you get when you install TeX live from the Debian/Ubuntu repositories can basically not update system-installed packages. If you install TeX live via apt/apt-get you are basically stuck with the package version your Linux distribution ships (which are usually not updated, unless you are on a rolling release?). If you want to live on the cutting edge, you need to install a 'vanilla' TeX live from TUG.org (How to install "vanilla" TeXLive on Debian or Ubuntu?).

moewe
  • 175,683