Builds have started failing because "tlmgr install" no longer works

I’ve long used Travis for CI with a GitHub repo that has a very simple travis.yml file. But I now find that my builds no longer work. The problem seems to lie with the installation of LaTeX packages, which I try to do by following the Travis CI instructions on R projects: tlmgr install no longer works.

Here is a link to one failed build. tlmgr complains that there is “No connection to the internet,” but there is; indeed, shortly before it makes this complaint, the log shows that Travis downloads the latest version of TeX Live from GitHub. More output from the log:

No connection to the internet.
Unable to download the checksum of the remote TeX Live database,
but found a local copy so using that.

The build seems to fail because the local copy doesn’t include all of the packages that I need to install.

I thought that I might solve the problem by adding tlmgr update --self to my travis.yml file, or by specifying a repository in the tlmgr install command. But neither strategy worked. Output from the build in which I tried these strategies is here. Even though I’ve added tlmgr update --self to travis.yml, I get this message in the log:

tlmgr itself needs to be updated.
Please do this via either
  tlmgr update --self
or by getting the latest updater for Unix-ish systems:

What can I do to get around this problem?

Per the instructions in the log, I’m mentioning @jeroen and @jimhester in this issue.

Maybe you can try with dist:bionic. The default dist is pretty old.

Thank you, @jeroen. I added dist: bionic to my travis.yml file. Unfortunately, it didn’t help: the error messages remain the same.

Inspection of the raw log reveals these lines:

[line 2588]  Setting up tex-common (6.09) ...
[2589] update-language: texlive-base not installed and configured, doing nothing!

[3023] tlmgr update --self
No connection to the internet.
Unable to download the checksum of the remote TeX Live database,
but found a local copy so using that.

You may want to try specifying an explicit or different CTAN mirror;
see the information and examples for the -repository option at
http://tug.org/texlive/doc/install-tl.html
(or in the output of install-tl --help).

tlmgr: package repository http://ftp.math.purdue.edu/mirrors/ctan.org/systems/texlive/tlnet (not verified: unknown)
tlmgr: saving backups to /home/travis/texlive/tlpkg/backups
tlmgr: no self-updates for tlmgr available.

Perhaps it’s worth noting that the Purdue repository seems to be down; I can’t connect to it. But when I run tlmgr install in travis.yml, I set the --repository option to a working repository – so this seems unlikely to be the problem.

I don’t know what to make of the tlmgr: no self-updates for tlmgr available message. Could that be closer to the root of the problem?